/*
Theme Name: The Grain
Theme URI: https://thegrain.org
Description: Custom theme for The Grain, the magazine of eco-socialist debate.
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: grain
*/

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

:root {
	--green: #344b37;
	--cream: #fffaf8;
	--blush: #e9d9d3;
	--rule: #ada0a0;
	--ink: #000;
	--muted: #6b6262; /* captions: grey, still readable on cream */

	--serif: 'Faculty Glyphic', Georgia, serif;
	--sans: 'Archivo', system-ui, sans-serif;

	--content: 1140px;
	--gutter: clamp(20px, 4vw, 40px);
	--admin-bar: var(--wp-admin--admin-bar--height, 0px);

	--fs-display: clamp(2.125rem, 1.35rem + 3.1vw, 3.625rem);   /* 34 → 58 */
	--fs-logo-lg: clamp(3rem, 1.2rem + 7.2vw, 6.5625rem);         /* 48 → 105 */
	--fs-tagline: clamp(1.25rem, 0.75rem + 2vw, 2.375rem);        /* 20 → 38 */
	--fs-section: clamp(1.625rem, 1.4rem + 0.9vw, 2rem);          /* 26 → 32 */
	--fs-box-title: clamp(1.5rem, 1.15rem + 1.4vw, 2.25rem);      /* 24 → 36 */
	--fs-card: 1.375rem;                                          /* 22 */
	--fs-prose: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);        /* 18 → 20 */
}

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

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(80px + var(--admin-bar)); }

body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font-family: var(--sans);
	font-weight: 300;
	font-size: 1rem;
	line-height: 1.35;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
.site-main { flex: 1; }

body.menu-open { overflow: hidden; }

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

h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.12; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
h1 a, h2 a, h3 a, .meta a { text-decoration: none; }
h1 a:hover, h2 a:hover, h3 a:hover, .meta a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

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

.skip-link {
	position: absolute; left: 1rem; top: -100px; z-index: 100;
	padding: 0.6rem 1rem;
	background: var(--cream); color: var(--ink);
}
.skip-link:focus { top: calc(1rem + var(--admin-bar)); }

.site-main:focus { outline: none; }

/* The leaf pattern. Green is already multiplied into the image. */
.pattern {
	background: var(--green) var(--pattern) center / cover;
	color: var(--cream);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.wrap {
	width: min(var(--content), 100% - 2 * var(--gutter));
	margin-inline: auto;
}
.wrap--wide { width: min(var(--content) + 40px, 100% - 2 * var(--gutter) + 40px); }
@media (max-width: 700px) { .wrap--wide { width: min(var(--content), 100% - 2 * var(--gutter)); } }

.section { padding-block: 30px; }
.section--center { display: flex; justify-content: center; }

.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.section .rule { margin-block: 30px; }
.rule--double { border-top-width: 2px; margin-top: 50px; }

.section-title { font-size: var(--fs-section); text-transform: capitalize; margin-bottom: 10px; }

.grid { display: grid; gap: 30px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 40px; }
@media (max-width: 1000px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
.grid--4 + .grid--2 { margin-top: 40px; }
@media (max-width: 560px) { .grid--2 { grid-template-columns: 1fr; } }

.columns-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
@media (max-width: 760px) { .columns-2 { grid-template-columns: 1fr; gap: 40px; } }

.stack { display: grid; gap: 20px; }

.more-link { margin-top: 30px; font-size: 1.125rem; font-weight: 400; }

/* ==========================================================================
   Header: one navbar that morphs
   --p: 0 = big homepage masthead, 1 = slim bar. Set from scroll in site.js;
   always 1 on other pages. Everything below is interpolated from it.
   ========================================================================== */

.site-header {
	--p: 1;
	--h-min: 57px;
	--h-max: 268px;           /* masthead height on the homepage */
	--logo: 105px;            /* masthead logo size */
	--logo-min: 0.2476;       /* 26px ÷ --logo */
	--brand-b: 20px;          /* logo's distance from the bottom, expanded */
	--tools-top: 20px;        /* icons' distance from the top, expanded */
	--sub-dx: 0px;            /* how far Subscribe moves left when expanded (measured) */

	position: relative;
	z-index: 50;
	height: var(--h-min);     /* reserves space; the bar itself is fixed */
}
.site-header.is-home { --p: 0; height: var(--h-max); }

@media (max-width: 1099px) {
	.site-header { --logo: 80px; --logo-min: 0.325; }
}
@media (max-width: 760px) {
	.site-header { --h-max: 200px; --logo: 52px; --logo-min: 0.5; --brand-b: 72px; }
}

.logo {
	margin: 0;
	font-family: var(--serif);
	font-weight: 400;
	text-transform: uppercase;
	white-space: nowrap;
	line-height: 1;
}

.bar {
	position: fixed;
	inset: var(--admin-bar) 0 auto;
	height: calc(var(--h-max) - (var(--h-max) - var(--h-min)) * var(--p));
	overflow: hidden;
	box-shadow: 0 0 30px rgba(0, 0, 0, calc(0.25 * var(--p)));
}
.site-header:not(.is-home) .bar { height: var(--h-min); }

.bar__inner { position: relative; height: var(--h-min); }
.site-header.is-home .bar__inner { height: calc(var(--h-max) - (var(--h-max) - var(--h-min)) * var(--p)); }

/* Logo: anchored bottom-left, scales down in place. */
.bar__brand {
	position: absolute;
	left: 0;
	bottom: calc(var(--brand-b) - (var(--brand-b) - 15.5px) * var(--p));
	display: block;
	color: inherit;
	text-decoration: none;
	transform-origin: left bottom;
	transform: scale(calc(1 - (1 - var(--logo-min)) * var(--p)));
}
.bar__brand .logo { display: block; font-size: var(--logo); }

.tagline {
	position: absolute;
	left: calc(100% + 30px);
	top: 50%;
	transform: translateY(-50%);
	width: 370px;
	font-family: var(--serif);
	font-size: calc(var(--logo) * 0.362);
	line-height: 1.15;
	white-space: normal;
	opacity: calc(1 - var(--p) * 2.5);
	pointer-events: none;
}
.site-header:not(.is-home) .tagline { display: none; }
@media (max-width: 760px) {
	.tagline { left: 0; top: calc(100% + 6px); transform: none; width: min(300px, 80vw); font-size: 1.25rem; }
}

/* Subscribe + search + menu: top-right, settles to the vertical middle. */
.bar__tools {
	position: absolute;
	right: 0;
	top: calc(var(--tools-top) - (var(--tools-top) - 12.5px) * var(--p));
	display: flex;
	align-items: center;
	gap: 30px;
	height: 32px;
}
.bar__link { font-size: 1.125rem; font-weight: 400; color: inherit; text-decoration: none; }
.bar__link:hover { text-decoration: underline; }
.bar__subscribe { transform: translateX(calc(var(--sub-dx) * (1 - var(--p)))); }

.icon-btn {
	position: relative;
	display: grid; place-items: center;
	width: 32px; height: 32px; margin: -8px;
	padding: 0; border: 0; background: none; color: inherit;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .icon-close { display: none; }
.menu-open .icon-btn .icon-menu { display: none; }
.menu-open .icon-btn .icon-close { display: block; }

/* Transitions only while animating between states (menu open/close), so the
   scroll-linked shrink tracks the scroll exactly. */
.is-animating .bar,
.is-animating .bar__inner,
.is-animating .bar__brand,
.is-animating .tagline,
.is-animating .bar__tools,
.is-animating .bar__subscribe {
	transition: height 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
		bottom 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), top 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s ease;
}

@media (max-width: 760px) {
	.bar__tools { gap: 24px; }
}
@media (max-width: 380px) {
	.site-header:not(.is-home) .bar__subscribe,
	.is-compact .bar__subscribe { display: none; } /* still in the menu */
}

/* ---- Search field inside the bar ---- */
.bar-search { position: relative; display: flex; align-items: center; }
.bar-search__form {
	position: absolute;
	right: calc(100% + 14px);
	top: 50%;
	transform: translateY(-50%);
	width: 0;
	overflow: hidden;
	opacity: 0;
	transition: width 0.3s ease, opacity 0.2s ease;
}
.bar-search__form input[type='search'] {
	width: 100%;
	padding: 4px 0;
	border: 0;
	border-bottom: 1px solid var(--cream);
	border-radius: 0;
	background: none;
	color: var(--cream);
	font-size: 1.125rem;
}
.bar-search__form input::placeholder { color: var(--cream); opacity: 0.7; }
.bar-search__form input[type='search']:focus { outline: none; border-bottom-width: 2px; }
.bar-search__form input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
	width: 12px;
	height: 12px;
	margin-left: 8px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 13'%3E%3Cpath fill='none' stroke='%23fffaf8' stroke-width='1.5' d='m1 1 11 11M12 1 1 12'/%3E%3C/svg%3E") center / contain no-repeat;
	cursor: pointer;
}

.search-open .bar-search__form { width: min(280px, 100vw - 2 * var(--gutter) - 110px); opacity: 1; }
.search-open .bar__subscribe { opacity: 0; visibility: hidden; }
@media (max-width: 760px) {
	.search-open .bar__brand { opacity: 0; visibility: hidden; } /* the field takes its place */
	.search-open .bar-search__form { width: calc(100vw - 2 * var(--gutter) - 90px); }
}

/* ---- Menu: the bar grows to fill the screen ---- */
body.menu-open .site-header .bar { height: calc(100vh - var(--admin-bar)); height: calc(100dvh - var(--admin-bar)); }
.menu-open .site-header.is-home .bar__inner { height: var(--h-min); }

.menu-panel {
	position: absolute;
	inset: var(--h-min) 0 0;
	overflow-y: auto;
	opacity: 0;
	transition: opacity 0.25s ease;
}
.menu-panel[hidden] { display: none; }
.menu-open .menu-panel { opacity: 1; transition-delay: 0.15s; }
.menu-panel__inner { display: grid; gap: 10px; justify-items: start; padding-block: clamp(40px, 8vh, 100px); }

.menu-panel__back {
	padding: 0; border: 0; background: none;
	font-size: 1.125rem; font-weight: 400;
}
.menu-panel__back:hover { text-decoration: underline; }

.menu-sections a {
	display: inline-block;
	font-family: var(--serif);
	font-size: var(--fs-display);
	line-height: 1.2;
	text-decoration: none;
}
.menu-sections a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.menu-secondary { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: clamp(1.375rem, 1rem + 1.5vw, 2rem); font-weight: 400; }
.menu-secondary li + li::before { content: '//'; margin-right: 10px; }
.menu-secondary a { text-decoration: none; }
.menu-secondary a:hover { text-decoration: underline; }

/* Social links (menu + footer): "Follow on: Instagram, Twitter". */
.social-links { margin: 0; font-size: 1.125rem; }
.social-links a { text-decoration: underline; }
.social-links a:hover { text-decoration: none; }
.menu-panel .social-links { margin-top: 10px; }

/* Share line under articles: "Share: X, Bluesky, WhatsApp, Email, Copy link". */
.share { margin: 30px 0 0; font-size: 1.125rem; }
.share a, .share__copy { text-decoration: underline; }
.share a:hover, .share__copy:hover { text-decoration: none; }
.share__copy { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }

/* Cookie notice (inc/analytics.php). */
.consent {
	position: fixed; z-index: 100; inset: auto 16px 16px auto;
	max-width: 420px; padding: 20px;
	background: var(--green); color: var(--cream);
	box-shadow: 0 4px 20px rgb(0 0 0 / 0.25);
}
.consent[hidden] { display: none; }
.consent__text { margin: 0 0 14px; font-size: 1rem; line-height: 1.45; }
.consent__text a { color: inherit; }
.consent__buttons { display: flex; gap: 10px; }
@media (max-width: 500px) { .consent { inset: auto 10px 10px 10px; max-width: none; } }

/* Footer logo uses the same wordmark, sized like the masthead. */
.logo--large { font-size: var(--fs-logo-lg); }
.site-footer .tagline { position: static; transform: none; opacity: 1; width: auto; max-width: 370px; font-size: var(--fs-tagline); pointer-events: auto; }

/* ==========================================================================
   Meta line: "Essay · 1st October 2026"
   ========================================================================== */

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; font-size: 1rem; }
.meta--large { font-size: 1.125rem; }
.meta__dot { width: 2px; height: 2px; border-radius: 50%; background: currentColor; }
.meta--large .meta__dot { width: 3px; height: 3px; }

/* ==========================================================================
   Cards
   ========================================================================== */

.cover { aspect-ratio: 3 / 2; overflow: hidden; background: var(--green) var(--pattern) center / cover; }
.cover img { width: 100%; height: 100%; object-fit: cover; }

.card { position: relative; display: grid; gap: 10px; align-content: start; }
.card__body { display: grid; gap: 10px; }
.card__title { font-size: var(--fs-card); line-height: 1.15; text-transform: capitalize; }
/* Whole card is clickable via the title link. */
.card__title a::after { content: ''; position: absolute; inset: 0; }
.card:hover .card__title a { text-decoration: underline; }
.card__excerpt { font-size: 1rem; }
.card__byline { font-size: 0.875rem; font-style: italic; }
/* Writer links sit above the card's whole-card link. */
.card__byline a, .meta a { position: relative; z-index: 1; text-decoration: none; }
.card__byline a:hover, .meta a:hover, .article__byline a:hover { text-decoration: underline; }
.article__byline a { text-decoration: none; }
.card:focus-within { outline: 2px solid var(--ink); outline-offset: 6px; }
.card__title a:focus-visible { outline: none; }

/* Phones: compact horizontal cards in the grids. */
@media (max-width: 560px) {
	.grid--4 { grid-template-columns: 1fr; row-gap: 24px; }
	.grid--4 .card { grid-template-columns: 40% 1fr; gap: 14px; align-items: start; }
	.grid--4 .card__body { gap: 6px; }
	.grid--4 .card__title { font-size: 1.1875rem; }
	.grid--4 .meta { font-size: 0.8125rem; gap: 0 6px; }
}

.list-item { display: grid; gap: 3px; }
.list-item .meta { font-size: 0.875rem; }
.list-item__title { font-size: var(--fs-card); line-height: 1.15; text-transform: capitalize; }
.list-item__excerpt { font-size: 1rem; }

/* ==========================================================================
   Homepage lead
   ========================================================================== */

.lead { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.lead__text { display: grid; gap: 10px; padding-block: 20px; }
.lead__title { font-size: var(--fs-display); line-height: 1.08; text-transform: capitalize; }
.lead__standfirst { font-size: 1.125rem; }

@media (max-width: 760px) {
	.lead { grid-template-columns: 1fr; gap: 16px; }
	.lead__cover { order: -1; }
	.lead__text { padding-block: 0; }
}

/* ==========================================================================
   Buttons & form fields
   ========================================================================== */

.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 32px;
	padding: 5px 8px;
	border: 1px solid transparent; border-radius: 0;
	font-size: 1.125rem; font-weight: 300; line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}
.btn:hover { text-decoration: underline; }
.btn--light { background: var(--cream); color: var(--green); }
.btn--outline-light { border-color: var(--cream); background: transparent; color: var(--cream); }
.btn--dark { background: var(--ink); color: var(--cream); }
.btn--lg { padding: 10px 18px; }
@media (pointer: coarse) { .btn { min-height: 44px; padding-inline: 12px; } }

input[type='email'], input[type='text'], input[type='search'], select, textarea {
	width: 100%;
	padding: 5px 6px;
	border: 1px solid var(--ink); border-radius: 0;
	background: var(--cream);
	font-size: 1.125rem;
}
@media (pointer: coarse) { input[type='email'], input[type='text'], input[type='search'], select { min-height: 44px; } }
::placeholder { color: #555; opacity: 1; }

.form-status:empty { display: none; }
.form-status { margin-top: 10px; font-size: 1rem; }

/* ==========================================================================
   Donate & subscribe boxes
   ========================================================================== */

.donate { padding: 20px; }
.donate__title { font-size: var(--fs-box-title); line-height: 1.17; }
.donate__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.donate__blurb { font-size: 1.125rem; }
.donate__blurb p + p { margin-top: 1.1em; }

.donate--wide { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 30px; padding: 40px 20px; }
@media (max-width: 760px) { .donate--wide { grid-template-columns: 1fr; gap: 24px; padding: 28px 20px; } }

.donate--side .donate__title { font-size: 1.5rem; line-height: 1.2; }
.donate--side .donate__actions { flex-direction: column; align-items: flex-start; }

.subscribe { padding: 20px; background: var(--blush); border: 1px solid var(--ink); }
.subscribe__title { font-size: var(--fs-box-title); line-height: 1.17; margin-bottom: 10px; }
.subscribe__form { display: flex; gap: 5px; }
.subscribe__form input { flex: 1; min-width: 0; }
.subscribe__note { margin-top: 10px; font-size: 0.875rem; }
.subscribe__text { margin-bottom: 12px; }

/* Plain: no box, sized like the text around it (holding page). */
.subscribe--plain { padding: 0; background: none; border: 0; font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem); line-height: 1.35; }
.subscribe--plain .subscribe__title { font-size: var(--fs-section); margin-bottom: 7px; }
.subscribe--plain .subscribe__form { max-width: 560px; }
@media (max-width: 560px) { .subscribe--plain .subscribe__form { flex-direction: column; align-items: flex-start; } }

.subscribe--wide { width: min(100%, 618px); padding: 41px; }
@media (max-width: 560px) {
	.subscribe--wide { padding: 24px 20px; }
	.subscribe--wide .subscribe__form { flex-direction: column; align-items: flex-start; }
}
.subscribe--side .subscribe__title { font-size: 1.5rem; line-height: 1.2; }
.subscribe--side .subscribe__form { flex-direction: column; align-items: flex-start; }

/* ==========================================================================
   Article page
   ========================================================================== */

.article {
	display: grid;
	grid-template-columns: minmax(0, 620px) 300px;
	grid-template-areas: 'header .' 'main aside';
	gap: 30px 20px;
	justify-content: center;
	padding-top: 30px;
}
.article__header { grid-area: header; display: grid; gap: 10px; padding-block: 20px 0; }
.article__title { font-size: var(--fs-display); line-height: 1.08; text-transform: capitalize; }
.article__standfirst { font-size: 1.25rem; font-style: italic; }
.article__byline { font-size: 1rem; }

.article__main { grid-area: main; display: grid; gap: 30px; align-content: start; }
.article__bio {
	padding-top: 20px;
	border-top: 1px solid var(--rule);
	font-size: var(--fs-prose);
	font-style: italic;
	line-height: 1.5;
}
.article__bio em, .article__bio i { font-style: normal; }
.article__bio p + p { margin-top: 0.8em; }
.article__cover figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--muted); }

.article__aside { grid-area: aside; display: flex; flex-direction: column; justify-content: space-between; gap: 60px; } /* spread down the article's length */

@media (max-width: 960px) {
	.article { grid-template-columns: minmax(0, 680px); grid-template-areas: 'header' 'main' 'aside'; }
	.article__aside { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; gap: 30px; margin-top: 30px; }
}

/* Long-form text */
.prose { font-size: var(--fs-prose); line-height: 1.5; }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { font-size: 1.75rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.4rem; margin-top: 1.4em; }
.prose blockquote, .prose .wp-block-pullquote {
	margin-inline: 0; padding: 0 0 0 20px;
	border-left: 3px solid var(--green);
	font-family: var(--serif); font-size: 1.5rem; line-height: 1.3;
}
.prose blockquote cite { display: block; margin-top: 8px; font-family: var(--sans); font-size: 1rem; font-style: normal; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose li + li { margin-top: 0.4em; }
.prose figcaption { font-size: 0.875rem; margin-top: 8px; color: var(--muted); }
.prose a { text-decoration-color: var(--green); }
.prose strong { font-weight: 400; }

/* Drop cap: pattern block, as designed. */
.prose--dropcap > p:first-of-type::first-letter {
	float: left;
	margin: 6px 8px 0 0;
	padding: 4px 9px;
	background: var(--green) var(--pattern) center / cover;
	color: var(--cream);
	font-family: var(--serif);
	font-size: 3.625rem; /* 58px */
	line-height: 1;
}

/* ==========================================================================
   Plain pages & archives
   ========================================================================== */

.page-body { width: min(760px, 100% - 2 * var(--gutter)); display: grid; gap: 30px; padding-block: 30px 60px; }
.page-body .article__header { grid-area: auto; }
.page-body .article__title { text-transform: none; } /* page titles as typed, e.g. "Contact us" */
.page-body > .donate, .page-body > .subscribe { max-width: 420px; }

.archive-header { display: grid; gap: 10px; padding-bottom: 30px; margin-bottom: 30px; border-bottom: 1px solid var(--rule); }
.archive-header__kicker { font-size: 1.125rem; }
.archive-header__title { font-size: var(--fs-display); text-transform: capitalize; }
.archive-header__desc { font-size: 1.125rem; max-width: 60ch; }
.tax-writer .archive-header__desc { font-size: var(--fs-prose); font-style: italic; line-height: 1.5; }

.pagination { margin-top: 50px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 1.125rem; font-weight: 400; }
.pagination .page-numbers { text-decoration: none; padding: 4px 2px; }
.pagination .page-numbers.current { border-bottom: 2px solid var(--ink); }
.pagination a.page-numbers:hover { text-decoration: underline; }

.search-form { display: flex; gap: 5px; max-width: 480px; }

.contact-form { display: grid; gap: 18px; max-width: 560px; }
.contact-form label { display: block; margin-bottom: 6px; font-size: 1rem; font-weight: 400; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { padding-block: 50px; }
.site-footer .wrap { display: grid; gap: 20px; }
.site-footer__brand { display: flex; align-items: center; gap: 10px 30px; flex-wrap: wrap; }
.site-footer .menu-secondary { padding-block: 20px 0; }
.site-footer__legal { font-size: 1.125rem; }

@media (max-width: 760px) {
	.site-footer__brand { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   About page
   ========================================================================== */

.about { padding-bottom: 60px; }
.about .article__main { gap: 50px; }
.team__title { margin-bottom: 20px; text-transform: none; }
.team__list { display: grid; gap: 24px; }
.team__member { display: flex; gap: 16px; align-items: flex-start; }
.team__photo { flex: none; width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.team__photo--blank { background: var(--green) var(--pattern) center / cover; }
.team__name { font-size: var(--fs-card); line-height: 1.15; }
.team__role { margin-top: 2px; font-size: 1rem; font-weight: 400; }
.team__bio { margin-top: 6px; font-size: 1.0625rem; line-height: 1.45; }

.about-links { display: flex; flex-wrap: wrap; gap: 12px 40px; }
.about-links__item { font-family: var(--serif); font-size: var(--fs-section); text-decoration: none; }
.about-links__item:hover { text-decoration: underline; }

.donate--inline .donate__blurb { margin-top: 20px; }
.donate--inline { padding: 28px 24px; }

.about__feature-label { margin-bottom: 10px; font-size: 1rem; font-weight: 400; }

/* ==========================================================================
   Call-to-submit text (synced patterns grain-letters-cta / grain-reviews-cta)
   ========================================================================== */

.cta-text { font-size: 1.125rem; line-height: 1.45; max-width: 60ch; }
.cta-text > * + * { margin-top: 0.8em; }
.cta-text--archive { margin-bottom: 40px; }
.cta-text--article { padding: 4px 0 4px 20px; border-left: 3px solid var(--green); font-size: var(--fs-prose); max-width: none; }

.about-copy--no-headings section > h2:first-child,
.about-copy--no-headings section > .wp-block-heading:first-child { display: none; } /* page title already says it */

/* ==========================================================================
   Pre-launch landing page
   ========================================================================== */

.landing-masthead { display: flex; align-items: flex-end; min-height: 268px; padding-block: 20px; }
.landing-masthead__brand { display: flex; align-items: center; gap: 10px 30px; flex-wrap: wrap; }
.landing-masthead__logo { font-size: var(--fs-logo-lg); }
.landing-masthead__tagline { max-width: 370px; font-family: var(--serif); font-size: var(--fs-tagline); line-height: 1.15; }

.landing-body {
	width: min(740px, 100% - 2 * var(--gutter));
	padding-block: clamp(40px, 6vw, 89px);
	display: grid;
	gap: 40px;
}
/* Holding page / About text (template-parts/about-copy.php) */
.about-copy {
	display: grid;
	gap: 40px;
	font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem); /* 18 → 24 */
	line-height: 1.35;
}
.about-copy h2 { font-size: var(--fs-section); margin-bottom: 7px; }
.about-copy p + p { margin-top: 1.2em; }
.about-copy ul { list-style: disc; padding-left: 1.5em; margin-bottom: 1.2em; }
.about-copy li + li { margin-top: 3px; }
.about-copy strong { font-weight: 600; }
.about-copy a { text-decoration-thickness: 1px; }
.about-copy a:hover { text-decoration-thickness: 2px; }
.landing .rule { margin-bottom: 20px; }
.landing-legal { margin-bottom: 40px; font-size: 0.875rem; }

@media (max-width: 760px) {
	.landing-masthead { min-height: 0; padding-block: 60px 24px; }
	.landing-masthead__brand { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
	html { scroll-behavior: auto; }
}
