/*
Theme Name: Michelle Rayner
Theme URI: https://michellerayner.com
Author: Michelle Rayner
Description: Portfolio theme for MichelleRayner.com: book cover design, Place drawings, and other creative stuff. The homepage is a wall of book covers; the large covers stay put and the smaller covers rotate through every cover you add under Book Covers.
Version: 2.8.4
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: michelle-rayner
*/

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
	font-family: "Quicksand";
	font-style: normal;
	font-display: swap;
	font-weight: 300 700;
	src: url("assets/fonts/quicksand-latin-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Quicksand";
	font-style: normal;
	font-display: swap;
	font-weight: 300 700;
	src: url("assets/fonts/quicksand-latin-ext-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Lacquer";
	font-style: normal;
	font-display: swap;
	font-weight: 400;
	src: url("assets/fonts/lacquer-latin-400-normal.woff2") format("woff2");
	/* everything except "?" (U+003F), which falls back to Quicksand */
	unicode-range: U+0000-003E, U+0040-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

/* ---------- Tokens ---------- */
:root {
	--ink: #231f20;
	--paper: #ffffff;
	--blush: #fdecec;
	--plum: #561e61;
	--magenta: #c42a8f;
	--accent: #30589f;
	--font-body: "Quicksand", "Helvetica Neue", Arial, sans-serif;
	--font-display: "Lacquer", "Quicksand", sans-serif;
	--measure: 1100px;
	--gutter: clamp(20px, 4vw, 48px);
	--body-size: clamp(16px, 0.55vw + 13px, 20px);
	--title-size: clamp(28px, 1.4vw + 16px, 35px);
	--display-size: clamp(20px, 1.3vw + 12px, 32px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-weight: 400;
	font-size: var(--body-size);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.2; margin: 0 0 .6em; }
p { margin: 0 0 1.1em; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 100; top: 8px; left: 8px;
	background: var(--paper); padding: 8px 14px; border: 1px solid var(--ink);
}

/* ---------- Header ---------- */
.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: clamp(24px, 3.4vw, 52px) var(--gutter) clamp(28px, 3.6vw, 56px) 0;
}
.site-brand {
	--logo-h: clamp(64px, 8.2vw, 124px);
	display: flex;
	align-items: center;
	gap: calc(var(--logo-h) * 0.21);
	flex: 0 1 auto;
	line-height: 0;
	text-decoration: none;
}
.site-brand .brand-circle { height: var(--logo-h); width: auto; max-width: none; flex: 0 0 auto; }
.site-brand .brand-word { height: calc(var(--logo-h) * 0.86); width: auto; max-width: none; }
.site-meta { text-align: right; flex: 0 0 auto; }
.site-tagline {
	font-family: var(--font-display);
	font-size: var(--display-size);
	line-height: 1.12;
	margin: 0 0 .55em;
	letter-spacing: .01em;
}
.site-tagline span, .site-tagline a { display: block; }
.site-tagline a { text-decoration: none; font-size: .86em; }
.site-tagline a:hover { color: var(--magenta); }

.site-nav ul {
	list-style: none; margin: 0; padding: 0;
	display: flex; justify-content: flex-end; flex-wrap: wrap;
	font-size: clamp(15px, .6vw + 12px, 21px);
}
.site-nav li { display: flex; align-items: center; }
.site-nav li + li::before { content: "/"; padding: 0 .6em; }
.site-nav a {
	text-decoration: none;
	padding-bottom: 4px;
	background: linear-gradient(var(--accent), var(--accent)) no-repeat left bottom / 0 3px;
	border-radius: 2px;
	transition: background-size .25s ease;
}
.site-nav a:hover { color: inherit; background-size: 100% 3px; }
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav a[aria-current="page"] { background-size: 100% 3px; }

/* ---------- Cover wall (homepage) ---------- */
.cover-wall {
	display: flex;
	align-items: flex-start;
	width: 100%;
	max-width: var(--wall-max, none);   /* keeps covers at a comfortable size on big screens */
	margin: 0 auto;
}
.cover-col { flex: 1 1 0; display: flex; flex-direction: column; min-width: 0; }
.tile {
	--tile: #34383b;
	position: relative;
	margin: 0;
	overflow: hidden;
	aspect-ratio: var(--ratio, 300 / 400);
	background-color: var(--tile);
	transition: background-color .9s ease;
}
.tile > a { position: absolute; inset: 0; display: block; }
.tile__cover {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 57%;
	height: auto;          /* box follows the cover's own shape: no empty strips beside it */
	transform: translate(-50%, -50%);
	box-shadow: 5px 8px 14px rgba(0, 0, 0, .38);
	transition: transform .5s ease;
}
.tile > * { transition: opacity .9s ease; }
.tile > .is-entering, .tile > .is-leaving { opacity: 0; }
.tile--feature .tile__cover {
	inset: 0;
	left: 0; top: 0;
	width: 100%;
	height: 100%;
	max-height: none;
	object-fit: cover;
	transform: none;
	box-shadow: none;
}
.tile--small a:hover .tile__cover,
.tile--small a:focus-visible .tile__cover { transform: translate(-50%, calc(-50% - 6px)); }
.cover-wall.is-cut .tile, .cover-wall.is-cut .tile > * { transition: none; }

.home-feature-image { margin: clamp(28px, 4vw, 40px) auto 0; max-width: var(--wall-max, none); }
.home-feature-image img { width: 100%; aspect-ratio: 900 / 330; object-fit: cover; }

@media (max-width: 700px) {
	.site-header { flex-direction: column; align-items: flex-start; padding-left: 0; }
	.site-meta { text-align: left; padding-left: var(--gutter); }
	.site-brand { --logo-h: clamp(96px, 27vw, 128px); }   /* bigger half-circle + name on phones */
	.site-brand .brand-word { height: calc(var(--logo-h) * 0.72); }   /* name stays at its earlier size on phones */
	.site-nav ul { justify-content: flex-start; }
	.cover-wall { display: grid; grid-template-columns: 1fr 1fr; }
	.cover-col { display: contents; }
	.tile { aspect-ratio: 2 / 3; order: var(--m, 0); }
	.tile__cover { width: 64%; }
	/* Large covers: fixed cover-shaped tile so swapping covers never changes the page height */
	.tile--feature { grid-column: span 2; aspect-ratio: 2 / 3; }
	.tile--feature .tile__cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
	.tile--wide-mobile { grid-column: span 2; aspect-ratio: 4 / 3; }
	.tile--wide-mobile .tile__cover { height: 78%; width: auto; }
}

/* ---------- Pages ---------- */
.site-main { padding-bottom: clamp(48px, 6vw, 90px); }
.entry {
	max-width: var(--measure);
	margin: 0 auto;
	padding: 0 var(--gutter);
}
.entry > *:first-child { margin-top: 0; }
.entry h1, .entry .mr-page-title, .mr-hello, .mr-section-title {
	font-size: var(--title-size);
	font-weight: 400;
	letter-spacing: -.005em;
}
.entry .mr-page-title { margin: 1.1em 0 .25em; }
.entry .mr-page-title:first-child { margin-top: 0; }
.entry .wp-block-image img { height: auto; }

/* Pill button (Lacquer) */
.wp-block-button.is-style-mr-pill .wp-block-button__link,
.mr-btn {
	display: inline-block;
	font-family: var(--font-display);
	font-size: clamp(19px, .9vw + 12px, 26px);
	line-height: 1.2;
	letter-spacing: .02em;
	color: var(--ink);
	background: transparent;
	border: 1.5px solid var(--ink);
	border-radius: 12px;
	padding: .45em 1.6em;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}
.wp-block-button.is-style-mr-pill .wp-block-button__link:hover,
.mr-btn:hover { background: var(--ink); color: var(--paper); }
.mr-center-btn { margin: 2em 0 2.6em; }
/* buttons never show an underline, on hover or focus */
.mr-btn, .mr-btn:hover, .mr-btn:focus, .mr-btn:focus-visible, .mr-btn:active,
.wp-block-button__link, .wp-block-button__link:hover, .wp-block-button__link:focus, .wp-block-button__link:active,
.site-connect a, .site-connect a:hover { text-decoration: none !important; }

/* About panel */
.mr-panel {
	background: var(--blush);
	padding: clamp(32px, 5vw, 64px) clamp(22px, 4.4vw, 44px) clamp(28px, 4vw, 50px);
	margin-bottom: clamp(36px, 4vw, 52px);
}
.mr-panel > * { max-width: none !important; }
.mr-panel.alignfull > *,
.mr-band > * { max-width: calc(var(--measure) - 2 * var(--gutter)) !important; margin-left: auto !important; margin-right: auto !important; }
.mr-intro { gap: clamp(20px, 3.4vw, 36px) !important; }
.mr-portrait img { aspect-ratio: 1; object-fit: cover; border-radius: 50%; width: 100%; }
.mr-hello { margin-top: .1em; }
.mr-cta-row { margin-top: 1.6em; gap: 20px; }
.mr-cta-row .wp-block-buttons { flex: 1 1 auto; }
.mr-cta-row .wp-block-button__link { white-space: nowrap; padding-left: 1.4em; padding-right: 1.4em; min-width: min(330px, 100%); }
.mr-badge {
	flex: 0 0 auto;
	width: 116px; height: 116px;
	margin: 0;
	border-radius: 50%;
	background: var(--plum);
	color: #fff;
	display: grid;
	place-items: center;
	text-align: center;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: .03em;
}
.mr-rule.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--plum);
	opacity: .7;
	margin: clamp(28px, 3.6vw, 40px) 0 clamp(20px, 3vw, 28px);
	width: 100%;
}
.mr-services { gap: 24px !important; align-items: center; margin: 0; }
.mr-subhead {
	font-family: var(--font-display);
	font-size: var(--display-size);
	line-height: 1.2;
	margin: 0;
}
@media (min-width: 782px) { .mr-subhead { white-space: nowrap; } }
.mr-subhead a { color: var(--magenta); text-decoration: none; }
.mr-subhead a:hover { text-decoration: underline; }
.mr-bullets { list-style: none; padding: 0; margin: 0; font-size: .92em; line-height: 1.7; }
.mr-bullets li::before { content: "•"; margin-right: .35em; }

/* Testimonial */
.mr-testimonial { gap: clamp(20px, 3vw, 40px) !important; align-items: center; margin: 0 0 clamp(24px, 3vw, 40px); }
.mr-section-title { margin: 0; line-height: 1.15; }
.mr-quote { font-size: 16px; line-height: 26px; margin-bottom: .6em; }
.mr-cite { font-size: 14px; letter-spacing: .02em; margin: 0; }

/* Photo row (wide + narrow, same height) */
.mr-photo-row { gap: clamp(14px, 3vw, 32px) !important; align-items: stretch; }
.mr-photo-row .wp-block-column { display: flex; }
.mr-photo-row .wp-block-image { margin: 0; width: 100%; display: flex; }
.mr-photo-row .wp-block-image img { width: 100%; height: 100%; object-fit: cover; }

/* Place */
.mr-place-intro > * { max-width: none !important; }
.wp-block-gallery.is-style-mr-masonry {
	display: block !important;
	columns: 2;
	column-gap: clamp(16px, 3vw, 32px);
}
.wp-block-gallery.is-style-mr-masonry .wp-block-image,
.wp-block-gallery.has-nested-images.is-style-mr-masonry figure.wp-block-image:not(#individual-image) {
	width: 100% !important;
	margin: 0 0 clamp(16px, 3vw, 32px) !important;
	break-inside: avoid;
	display: block;
}
.wp-block-gallery.is-style-mr-masonry .wp-block-image img { width: 100%; height: auto !important; object-fit: contain !important; }

@media (max-width: 781px) {
	.mr-portrait { max-width: 180px; }
	.mr-services { gap: 0 !important; }
	.mr-services .mr-subhead { margin-bottom: .7em; }
	.mr-services > .wp-block-column { margin: 0 !important; flex-basis: 100% !important; }
	.mr-photo-row { flex-wrap: nowrap !important; }
}
@media (max-width: 520px) {
	.wp-block-gallery.is-style-mr-masonry { columns: 1; }
}


/* ---------- Full-width + wide blocks (Align: Full width / Wide width) ---------- */
.entry > .alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}
.entry > .alignwide {
	width: min(1400px, 100vw - 2 * var(--gutter));
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
}
.entry > .alignfull.is-layout-constrained,
.entry > .alignfull.wp-block-group,
.entry > .alignfull.wp-block-cover { padding-left: var(--gutter); padding-right: var(--gutter); }
.entry > .alignfull > .wp-block-group__inner-container,
.entry > .alignfull.is-layout-constrained > :not(.alignfull):not(.alignwide) {
	max-width: calc(var(--measure) - 2 * var(--gutter));
	margin-left: auto;
	margin-right: auto;
}
.entry > .wp-block-group.alignfull.has-background { padding-top: clamp(40px, 6vw, 90px); padding-bottom: clamp(40px, 6vw, 90px); }

/* ---------- Menu line colour per link ---------- */
.site-nav a { --line: var(--link-accent, var(--accent)); background-image: linear-gradient(var(--line), var(--line)); }

/* ---------- Rotating testimonials (Group block > Styles > Rotating testimonials) ---------- */
.is-style-mr-rotate,
.is-style-mr-rotate > .wp-block-group__inner-container { display: grid; }
.is-style-mr-rotate { overflow: hidden; }
.mr-slide { grid-area: 1 / 1; margin: 0 !important; align-self: start; }
@media (max-width: 781px) {
	/* phones: the box fits the testimonial showing, so the dots sit the same distance below each one */
	.is-style-mr-rotate.is-ready { transition: height .55s cubic-bezier(.22, .61, .36, 1); }
}

/* Slide in from the right, slide out to the left (testimonials + their photos/videos) */
.mr-slide,
.mr-photo-rotate > .mr-photo-slide {
	transition:
		opacity .75s ease,
		transform .75s cubic-bezier(.22, .61, .36, 1),
		visibility 0s linear .75s;
}
.is-style-mr-rotate.is-ready .mr-slide,
.mr-photo-rotate.is-ready > .mr-photo-slide { opacity: 0; visibility: hidden; transform: translateX(var(--mr-slide-in, 60px)); }
.is-style-mr-rotate.is-ready .mr-slide.is-leaving,
.mr-photo-rotate.is-ready > .mr-photo-slide.is-leaving { transform: translateX(calc(-1 * var(--mr-slide-in, 60px))); }
.is-style-mr-rotate.is-ready .mr-slide.is-current,
.mr-photo-rotate.is-ready > .mr-photo-slide.is-current { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mr-photo-rotate { --mr-slide-in: 90px; overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
	.mr-slide, .mr-photo-rotate > .mr-photo-slide { transform: none !important; }
}
.mr-rotate-dots { display: flex; gap: 8px; margin-top: 14px; }
/* photo rows / videos that change with the testimonials */
.mr-photo-rotate { display: grid; }
.mr-photo-rotate > .mr-photo-slide { grid-area: 1 / 1; margin: 0 !important; }
.mr-testimonial-video { margin-top: 0; }
.mr-testimonial-video video { display: block; width: 100%; height: auto; }
.mr-rotate-dots button {
	width: 10px; height: 10px; padding: 0; border-radius: 50%;
	border: 1.5px solid var(--ink); background: transparent; cursor: pointer;
}
.mr-rotate-dots button[aria-current="true"] { background: var(--ink); }

/* ---------- Cover pages ---------- */
.single-mr_cover .site-main { padding-top: clamp(8px, 2vw, 24px); }
.mr-cover-intro { gap: clamp(24px, 5vw, 70px) !important; margin-bottom: clamp(40px, 6vw, 80px); }
.mr-cover-title { font-size: var(--title-size); margin: 0 0 .15em; }
.mr-cover-author { text-transform: uppercase; letter-spacing: .04em; font-size: 1.05em; margin-bottom: 1.2em; }
.entry .mr-rule-accent.wp-block-separator,
.entry hr.mr-rule-accent {
	border: 0 !important;
	border-top: 1.5px solid #b0237a !important;
	background: none !important;
	color: #b0237a;
	opacity: 1;
	height: 0;
	width: 100%; max-width: 100%; margin: 2em 0 0;
}
.mr-3d img { width: 100%; height: auto; }
.entry > .wp-block-video.mr-3d-video { margin-top: 0; margin-bottom: 0; line-height: 0; }
.mr-3d-video video { display: block; width: 100%; height: auto; }
.mr-band { color: #fff; }
.mr-band .wp-block-columns { margin: 0; gap: clamp(20px, 5vw, 60px); }
.mr-band video { display: block; }
/* Live site only (.entry isn't in the editor): hide spots you haven't filled yet */
.entry .wp-block-video:not(:has(video[src])),
.entry .wp-block-gallery:not(:has(img)),
.entry .wp-block-image:not(:has(img)) { display: none; }
.mr-cover-more { margin-top: clamp(40px, 6vw, 80px) !important; }
.mr-cover-more.wp-block-gallery.has-nested-images figure.wp-block-image img { object-fit: contain; }

/* ---------- "ready? let's connect." above the sketch ---------- */
.site-connect { text-align: center; padding: clamp(10px, 2vw, 24px) var(--gutter) clamp(30px, 4vw, 56px); }

/* ---------- Authors: process list on a light blue panel ---------- */
.mr-panel--blue { background: #e4f3fa; }
.mr-process-lead { font-weight: 600; margin: 0 0 .9em; }
ol.mr-process {
	margin: 0;
	padding-left: 1.4em;
	columns: 3;
	column-gap: clamp(24px, 4vw, 56px);
	line-height: 1.5;
}
ol.mr-process > li { break-inside: avoid; padding: .3em 0 .3em .2em; }
ol.mr-process > li::marker { font-weight: 600; }
@media (max-width: 900px) { ol.mr-process { columns: 2; } }
@media (max-width: 560px) { ol.mr-process { columns: 1; } ol.mr-process > li { padding: .15em 0 .15em .2em; } }

/* ---------- Same-height photo rows (cover-page photos, Styles > Same-height row) ---------- */
.mr-same-row {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: flex-start !important;
	gap: clamp(12px, 2vw, 24px) !important;
}
.mr-same-row > figure,
.mr-same-row > .wp-block-column {
	flex: var(--ar, 1) 1 0% !important;   /* width follows the photo's shape */
	width: auto !important;
	max-width: none !important;
	min-width: 0;
	margin: 0 !important;
}
.mr-same-row figure.wp-block-image,
.mr-same-row .wp-block-image { margin: 0 !important; }
.mr-same-row img {
	display: block;
	width: 100% !important;
	height: auto !important;
	object-fit: contain !important;
}
@media (max-width: 781px) {
	.mr-same-row { flex-direction: column !important; }
	.mr-same-row > figure,
	.mr-same-row > .wp-block-column { flex: none !important; width: 100% !important; }
}

/* ---------- Sketch above the footer ---------- */
.site-sketch { margin: 0; line-height: 0; }
.site-sketch img { width: 100%; height: auto; }

/* ---------- Footer ---------- */
.site-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 28px;
	padding: clamp(26px, 3vw, 40px) var(--gutter);
	font-size: 15px;
	background: var(--footer-bg, #3e1547);
	color: #fff;
}
.site-footer p { margin: 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-cosmic { font-weight: 700; }
.footer-display { font-family: var(--font-display); font-size: 19px; letter-spacing: .02em; }

/* ---------- Blog / fallback ---------- */
.archive-list { list-style: none; padding: 0; }
.archive-list li { margin-bottom: 1.4em; }
