/* WP Evangelist theme. Design tokens come from theme.json. */

:root {
	--wpe-stroke: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'%3E%3Cpath d='M1 2 C 40 0, 120 1, 198 0 L 200 37 C 150 40, 60 38, 1 40 L 2.5 20 Z' fill='%233858e9'/%3E%3C/svg%3E");
}

/* Links: the highlighter on hover ------------------------------------------ */

a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:where(:not(.wp-element-button, .wp-block-button__link, .wpe-button, .wp-block-site-title a)):hover {
	background: var(--wpe-stroke) center / 100% 100% no-repeat;
	color: var(--wp--preset--color--white);
	text-decoration: none;
	padding: 0.02em 0.25em;
	margin: 0 -0.25em;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
a:where(.wp-block-post-featured-image a, [aria-hidden="true"]):hover { background: none; padding: 0; margin: 0; }
:focus-visible { outline: 3px solid var(--wp--preset--color--highlight); outline-offset: 3px; }

mark.wpe-hl, .is-style-wpev-pull mark {
	background: var(--wpe-stroke) center / 100% 100% no-repeat;
	color: var(--wp--preset--color--white);
	padding: 0.05em 0.25em;
	margin: 0 -0.1em;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

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

.wp-block-site-title a {
	background: var(--wpe-stroke) center / 100% 100% no-repeat;
	color: var(--wp--preset--color--white);
	text-decoration: none;
	padding: 0.05em 0.25em;
}
.wpe-header .wp-block-navigation-item__content[aria-current="page"] {
	background: var(--wpe-stroke) center / 100% 100% no-repeat;
	color: var(--wp--preset--color--white);
	padding: 0 0.25em;
	margin: 0 -0.25em;
}
.wpe-header .wp-block-navigation a.wp-block-navigation-item__content:hover {
	background: var(--wpe-stroke) center / 100% 100% no-repeat;
	color: var(--wp--preset--color--white);
	padding: 0 0.25em;
	margin: 0 -0.25em;
}

/* No gap between the newsletter and the footer. */
.wp-site-blocks > footer.wp-block-template-part,
.wp-site-blocks > main + footer { margin-block-start: 0; }
main > .wp-block-template-part:last-child { margin-block-end: 0; }
.wpe-header .wpe-subscribe .wp-block-button__link { padding: 0.6rem 1.1rem; }
.wpe-header .wp-block-navigation__responsive-container-open,
.wpe-header .wp-block-navigation__responsive-container-close { color: var(--wp--preset--color--ink); }
.wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { gap: 1rem; font-size: 1.25rem; }

/* Page and section heads --------------------------------------------------- */

.wpe-page-head { padding-block: 3.5rem; }
.wpe-page-title, .wpe-page-head .wp-block-post-title, .wpe-page-head h1 {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: clamp(3rem, 7vw, 6.75rem);
	line-height: 0.98;
	letter-spacing: -0.02em;
	margin: 0;
	text-wrap: balance;
}
.wpe-lede { font-size: 1.25rem; color: #333; max-width: 34em; }
.wpe-eyebrow { font-style: italic; color: var(--wp--preset--color--grey); font-size: 1rem; }

.wpe-section-head,
.is-style-wpev-section-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1.25rem;
	flex-wrap: wrap;
	border-bottom: 1px solid var(--wp--preset--color--ink);
	padding-bottom: 1rem;
	margin-bottom: 2.75rem;
}
.is-style-wpev-section-head h2 { margin: 0; font-size: clamp(2.25rem, 4vw, 3.5rem); line-height: 1; }
.is-style-wpev-section-head p { margin: 0; font-size: 0.95rem; font-style: italic; }

/* Essays lists (Query Loop) ------------------------------------------------ */

.wpe-essay-list .wp-block-post { padding-block: 2rem; border-bottom: 1px solid var(--wp--preset--color--line); }
.wpe-essay-list .wp-block-post:first-child { padding-top: 0; }
.wpe-essay-list .wp-block-post:last-child { border-bottom: 0; }
.wpe-essay-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 0.9fr); gap: 2.25rem; align-items: start; }
.wpe-essay-row > * { margin: 0; }
.wpe-essay-row .wp-block-post-title { font-size: 2rem; line-height: 1.12; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
.wpe-essay-row .wp-block-post-title a { text-decoration: none; }
/* Core makes title links inline-block: keep them inline so the highlighter follows each line and nothing moves on hover. */
.wp-block-post-title a { display: inline; }
.wpe-essay-row .wp-block-post-excerpt { margin: 0; }
.wpe-essay-row .wp-block-post-excerpt__excerpt { margin: 0; }
.wpe-essay-row .wp-block-post-date { margin-top: 0.625rem; }

.wpe-bw-image, .wpe-essay-row .wp-block-post-featured-image { position: relative; overflow: hidden; isolation: isolate; background: var(--wp--preset--color--line); }
.wpe-bw-image img, .wpe-essay-row .wp-block-post-featured-image img { filter: grayscale(1) contrast(1.2); transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.wpe-essay-row .wp-block-post-featured-image::after { content: ""; position: absolute; inset: 0; background: var(--wp--preset--color--highlight); mix-blend-mode: multiply; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.wpe-essay-row:hover .wp-block-post-featured-image::after, .wpe-essay-row:focus-within .wp-block-post-featured-image::after { opacity: 1; }
.wpe-essay-row:hover .wp-block-post-featured-image img { transform: scale(1.04); }

.wpe-cards { gap: 3rem 1.75rem; }

/* Single essay ------------------------------------------------------------- */

.wpe-article-head { padding-block: 3rem; }
.wpe-article-head .wp-block-post-title { font-size: clamp(2.5rem, 5.6vw, 5.25rem); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; max-width: 18em; }
.wpe-article-head .wp-block-post-excerpt { font-size: 1.45rem; line-height: 1.5; max-width: 32em; }
.wpe-article-figure img { aspect-ratio: 21 / 9; object-fit: cover; }
.wpe-prose { font-size: 1.3rem; line-height: 1.75; }
.wpe-prose .wp-block-post-content h2 { font-size: 2.25rem; margin-top: 1.6em; }
.is-style-wpev-pull { font-family: var(--wp--preset--font-family--display); font-size: 2.1rem; line-height: 1.25; margin-block: 1.4em; }
.wp-block-pullquote { text-align: left; }

/* Password protected pages -------------------------------------------------- */

.post-password-form { max-width: 560px; padding-block: 2rem 6rem; }
.post-password-form p:first-child { font-size: 1.25rem; }
.post-password-form label { display: flex; flex-direction: column; gap: 0.5rem; font-weight: 700; }
.post-password-form input[type="password"] { box-sizing: border-box; width: 100%; font: inherit; font-size: 1.1rem; padding: 0.75rem 0.875rem; border: 1.5px solid var(--wp--preset--color--ink); border-radius: 0; }
.post-password-form input[type="submit"] { font: inherit; font-weight: 700; padding: 0.8rem 1.4rem; border: 0; background: var(--wp--preset--color--highlight); color: var(--wp--preset--color--white); cursor: pointer; margin-top: 0.75rem; }
.post-password-form input[type="submit"]:hover { background: var(--wp--preset--color--dark); }

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

.wpe-footer { font-family: var(--wp--preset--font-family--sans); font-size: 0.95rem; }
.wpe-footer .wp-block-site-title { font-size: 2.25rem; }
.wpe-footer a { color: rgba(255, 255, 255, 0.88); text-decoration: none; }
.wpe-footer a:hover { color: var(--wp--preset--color--white); }
.wpe-footer h2 { font-family: var(--wp--preset--font-family--sans); font-size: 0.95rem; font-weight: 600; letter-spacing: 0; margin: 0 0 0.75rem; color: var(--wp--preset--color--white); }
.wpe-footer ul { list-style: none; padding: 0; margin: 0; line-height: 2.1; }
.wpe-footer__tag { color: rgba(255, 255, 255, 0.72); max-width: 22em; }
.wpe-footer__row { border-top: 1px solid rgba(255, 255, 255, 0.2); padding-top: 1.375rem; }
.wpe-footer__bottom { font-size: 0.8rem; color: rgba(255, 255, 255, 0.65); }

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

@media (max-width: 1000px) {
	.wpe-essay-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
	.wpe-essay-row > :last-child { grid-column: 2; }
}

@media (max-width: 600px) {
	.wpe-essay-row { grid-template-columns: 1fr; }
	.wpe-essay-row > :last-child { grid-column: auto; }
	.wpe-prose { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
	.wpe-essay-row .wp-block-post-featured-image img, .wpe-essay-row .wp-block-post-featured-image::after { transition: none; }
	.wpe-essay-row:hover .wp-block-post-featured-image img { transform: none; }
}

/* Pages ------------------------------------------------------------------- */

.wpe-big-list { list-style: none; counter-reset: wpe-b; padding: 0; margin: 0 0 1.75rem; }
.wpe-big-list li { counter-increment: wpe-b; display: grid; grid-template-columns: 60px 1fr; padding: 1.125rem 0; border-top: 1px solid var(--wp--preset--color--line); font-family: var(--wp--preset--font-family--display); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.2; }
.wpe-big-list li::before { content: counter(wpe-b); color: var(--wp--preset--color--highlight); }

/* Pagination -------------------------------------------------------------- */

.wp-block-query-pagination { border-top: 1px solid var(--wp--preset--color--ink); padding-top: 1.5rem; gap: 1.5rem; align-items: baseline; font-size: 1rem; }
.wp-block-query-pagination a { text-decoration: none; }
.wp-block-query-pagination-previous, .wp-block-query-pagination-next { font-style: italic; }
.wp-block-query-pagination-numbers { order: -1; margin-right: auto; display: flex; gap: 0.25rem; align-items: baseline; font-family: var(--wp--preset--font-family--display); font-size: 1.6rem; line-height: 1; }
.wp-block-query-pagination-numbers .page-numbers { display: inline-block; min-width: 1.6em; padding: 0.2em 0.25em; text-align: center; }
.wp-block-query-pagination-numbers a.page-numbers:hover { margin: 0; padding: 0.2em 0.25em; }
.wp-block-query-pagination-numbers .page-numbers.current { background: var(--wpe-stroke) center / 100% 100% no-repeat; color: var(--wp--preset--color--white); }
.wp-block-query-pagination-numbers .dots { color: var(--wp--preset--color--grey); }
.wp-block-query-pagination > .wp-block-query-pagination-numbers { margin-right: auto; }
.wp-block-query-pagination > .wp-block-query-pagination-previous { margin-right: 1.5rem; }

/* Legal pages ---------------------------------------------------------------- */

.wpe-legal .wp-block-post-content { font-size: 1.1rem; line-height: 1.7; padding-bottom: 1rem; }
.wpe-legal .wp-block-post-content h2 { font-size: 1.75rem; margin-top: 2.2em; margin-bottom: 0.5em; }
.wpe-legal .wp-block-post-content h3 { font-family: var(--wp--preset--font-family--text); font-weight: 700; font-size: 1.1rem; margin-top: 1.6em; margin-bottom: 0.4em; }

/* Maintenance page ----------------------------------------------------------- */

.wpe-soon__bar { padding-block: 1.75rem; border-bottom: 1px solid var(--wp--preset--color--line); }
.wpe-soon__bar .wp-block-site-title { font-size: 1.6rem; margin: 0; }
.wpe-soon .wpe-page-head h1 { max-width: 12em; }
.wpe-soon .wpe-page-head .wpe-lede { margin-top: 2rem; }
.wpe-soon__footer { padding-block: 2rem; }
.wpe-soon__footer a { color: inherit; }
