/*
Theme Name: Unafraid
Theme URI: https://example.eu/
Description: A protest-zine theme for Unafraid, independent commentary for a new generation of Europeans. Child theme of Twenty Twenty-Four. Democracy takes courage.
Author: Unafraid
Template: twentytwentyfour
Version: 1.1.0
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: unafraid
Tags: blog, news, block-patterns, full-site-editing
*/

:root {
	--u-paper: var(--wp--preset--color--base, #F1EFE8);
	--u-ink: var(--wp--preset--color--contrast, #111111);
	--u-pink: var(--wp--preset--color--accent, #FF3EA5);
	--u-blue: var(--wp--preset--color--accent-2, #1A3FB0);
	--u-kraft: var(--wp--preset--color--accent-3, #D9C6A5);
	--u-head: var(--wp--preset--font-family--heading, "Big Shoulders Display", sans-serif);
	--u-wrap: 1240px;
	--u-gutter: clamp(16px, 3vw, 28px);
}

/* ---------- Layout helpers ---------- */
.u-wrap {
	max-width: var(--u-wrap);
	margin-inline: auto !important;
	padding-inline: var(--u-gutter);
	box-sizing: border-box;
}
.u-main > * + * { margin-block-start: clamp(56px, 8vw, 96px); }
.u-section-title { margin: 0 0 6px; font-size: clamp(2.4rem, 5vw, 3.6rem); }
.u-section-sub { margin: 0 0 28px; font-style: italic; }
.wp-site-blocks { padding-top: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* ---------- Ticker ---------- */
.u-ticker {
	background: var(--u-ink);
	color: var(--u-paper);
	overflow: hidden;
	white-space: nowrap;
	padding: 9px 0;
}
.u-ticker p {
	display: inline-block;
	margin: 0;
	padding-left: 100%;
	font-family: var(--u-head);
	font-weight: 800;
	font-size: 16px;
	letter-spacing: .12em;
	text-transform: uppercase;
	animation: u-ticker 45s linear infinite;
}
.u-ticker strong { color: var(--u-pink); font-weight: 800; padding: 0 .7em; }
@keyframes u-ticker { to { transform: translateX(-100%); } }
.u-ticker p { white-space: nowrap; }
.editor-styles-wrapper .u-ticker p { animation: none; padding-left: var(--u-gutter); }
@media (prefers-reduced-motion: reduce) {
	.u-ticker p { animation: none; padding-left: var(--u-gutter); }
}

/* ---------- Masthead ---------- */
.u-masthead { padding-top: 22px; }
.u-topline {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 6px 24px;
}
.u-topline p {
	margin: 0;
	font-family: var(--u-head);
	font-weight: 800;
	font-size: 15px;
	letter-spacing: .1em;
	text-transform: uppercase;
}
.u-logo, .u-logo a {
	margin: 14px 0 0;
	font-family: var(--u-head) !important;
	font-weight: 900 !important;
	font-size: clamp(88px, 17vw, 228px) !important;
	line-height: .82 !important;
	text-transform: uppercase;
	text-decoration: none !important;
	color: var(--u-ink) !important;
	text-shadow: .03em .025em 0 var(--u-pink);
}
.u-navbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	margin-top: 14px !important;
	padding: 12px 0;
	border-top: 3px solid var(--u-ink);
	border-bottom: 3px solid var(--u-ink);
}
.u-tagline { margin: 0; font-style: italic; font-size: 1.35rem; }
.u-nav,
.u-nav .wp-block-navigation-item__content {
	font-family: var(--u-head);
	font-weight: 800;
	font-size: 20px;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
}
.u-nav .wp-block-navigation__container { gap: 6px 22px; }
.u-nav .wp-block-navigation-item:last-child > .wp-block-navigation-item__content {
	background: var(--u-ink);
	color: var(--u-paper);
	padding: 2px 10px;
}

/* ---------- Hero ---------- */
.u-hero {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	align-items: flex-start;
	margin-top: 40px !important;
}
.u-hero__lead { flex: 999 1 560px; min-width: 0; }
.u-hero__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.u-hero__lead .wp-block-post-template { margin: 0; padding: 0; list-style: none; }
.u-photo { position: relative; }
.u-photo .wp-block-post-featured-image { margin: 0; }
.u-photo .is-style-sticker,
.u-photo .u-sticker {
	position: absolute;
	top: -18px;
	right: -10px;
	margin: 0;
	z-index: 2;
}
.u-hero .wp-block-post-terms { margin: 22px 0 0; }
.u-hero__title { margin: 8px 0 0 !important; font-size: clamp(3rem, 6.4vw, 5.6rem) !important; line-height: .9 !important; }
.u-hero__title a {
	display: inline;
	text-decoration: none;
	background-image: linear-gradient(transparent 58%, var(--u-pink) 58%, var(--u-pink) 90%, transparent 90%);
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
.u-standfirst { margin: 16px 0 0; font-size: 1.3rem; line-height: 1.5; max-width: 40em; }
.u-content .u-standfirst { max-width: 820px; margin-top: 0; }
.u-page-head + .u-content, .u-wrap + .u-content { margin-top: 20px !important; }
.u-standfirst .wp-block-post-excerpt__more-text { display: none; }
.u-byline { margin-top: 10px; font-style: italic; }
.u-byline::before { content: "by "; }

/* "Also in this issue": numbered list from a query */
.u-numbered .wp-block-post-template { counter-reset: u-num 1; margin: 0; padding: 0; list-style: none; }
.u-numbered .wp-block-post {
	counter-increment: u-num;
	display: flex;
	gap: 14px;
	border-top: 2px solid var(--u-ink);
	padding: 12px 0;
	margin: 0;
}
.u-numbered .wp-block-post:last-child { border-bottom: 2px solid var(--u-ink); }
.u-numbered .wp-block-post::before {
	content: counter(u-num, decimal-leading-zero);
	font-family: var(--u-head);
	font-weight: 900;
	font-size: 30px;
	line-height: .9;
	color: var(--u-blue);
}
.u-numbered .wp-block-post-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--body);
	text-transform: none;
	font-weight: 600;
	font-size: 1.15rem;
	line-height: 1.3;
}
.u-numbered .wp-block-post-title a { text-decoration: none; }
.u-side-title { margin: 0 0 10px !important; font-size: 1.8rem !important; }

/* ---------- Labels, myth, sticker ---------- */
.is-style-label,
.u-label,
.wp-block-post-terms.u-label a {
	font-family: var(--u-head);
	font-weight: 800;
	font-size: 16px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--u-blue);
	text-decoration: none;
}
.is-style-myth {
	text-decoration: line-through;
	text-decoration-color: var(--u-pink);
	text-decoration-thickness: 4px;
}
.is-style-sticker,
.u-sticker {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 104px;
	height: 104px;
	border-radius: 50%;
	background: var(--u-pink);
	color: var(--u-ink);
	font-family: var(--u-head);
	font-weight: 900;
	font-size: 20px;
	line-height: .95;
	text-transform: uppercase;
	text-align: center;
	transform: rotate(10deg);
}

/* ---------- Boxes, placards, stamps ---------- */
.is-style-zine-box {
	background: #fff;
	border: 3px solid var(--u-ink);
	padding: 24px !important;
}
.u-tilt { transform: rotate(-1.2deg); }
.is-style-zine-box > :first-child { margin-top: 0; }
.is-style-zine-box h2 { font-size: 2.2rem; margin: 0; }
.u-blue-text { color: var(--u-blue); }
.u-pink-text { color: var(--u-pink); }

.u-placards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 34px 26px;
}
.is-style-placard,
.is-style-placard-pink,
.is-style-placard-blue {
	position: relative;
	background: var(--u-kraft);
	color: var(--u-ink);
	padding: 32px 22px 24px !important;
	min-height: 210px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	transform: rotate(-2deg);
	transition: transform .2s ease;
}
.is-style-placard-pink { background: var(--u-pink); transform: rotate(1.5deg); }
.is-style-placard-blue { background: var(--u-blue); color: #fff; transform: rotate(-1deg); }
.u-placards > :nth-child(4n) { transform: rotate(2deg); }
.is-style-placard:hover, .is-style-placard-pink:hover, .is-style-placard-blue:hover { transform: rotate(0) scale(1.02); }
.is-style-placard::before,
.is-style-placard-pink::before,
.is-style-placard-blue::before {
	content: "";
	position: absolute;
	top: -10px;
	left: 38%;
	width: 64px;
	height: 20px;
	background: rgba(255, 255, 255, .7);
	transform: rotate(4deg);
}
.is-style-placard p, .is-style-placard-pink p, .is-style-placard-blue p { margin: 0; }
.u-placard-title,
.u-placard-title a {
	font-family: var(--u-head);
	font-weight: 900;
	font-size: clamp(2rem, 3vw, 2.5rem);
	line-height: .92;
	text-transform: uppercase;
	text-decoration: none;
	color: inherit !important;
}
.u-watch {
	margin-top: 14px !important;
	font-family: var(--u-head);
	font-weight: 800;
	font-size: 16px;
	letter-spacing: .1em;
	text-transform: uppercase;
}
.is-style-placard-blue .u-watch { color: var(--wp--preset--color--accent-4); }

.u-stamps {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 22px;
}
.is-style-stamp {
	background: #fff;
	border: 3px dashed var(--u-ink);
	padding: 14px 16px !important;
	transform: rotate(-1.5deg);
	transition: transform .2s ease;
}
.u-stamps > :nth-child(even) { transform: rotate(1.5deg); }
.is-style-stamp:hover { transform: rotate(0) scale(1.03); }
.is-style-stamp p { margin: 0; }
.u-stamp-city, .u-stamp-city a {
	font-family: var(--u-head);
	font-weight: 900;
	font-size: 30px;
	line-height: .95;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--u-ink);
}
.u-stamp-country { font-style: italic; font-size: 14px; color: var(--u-blue); }

/* ---------- Cards (fresh takes, archives) ---------- */
.u-cards .wp-block-post-template { gap: 34px 26px; margin: 0; padding: 0; }
.u-cards .wp-block-post { margin: 0; }
.u-cards .wp-block-post-featured-image { margin: 0 0 14px; }
.u-cards .wp-block-post-title { margin: 6px 0 0; font-size: 1.9rem; line-height: .95; }
.u-cards .wp-block-post-title a { text-decoration: none; }
.u-cards .wp-block-post-date { margin-top: 8px; font-size: .95rem; font-style: italic; }
.u-cards .wp-block-post-terms { margin: 0; }

/* ---------- Halftone dots over any image ---------- */
.is-style-halftone,
.u-halftone { position: relative; overflow: hidden; }
.is-style-halftone::after,
.u-halftone::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image: radial-gradient(rgba(17, 17, 17, .55) 1px, transparent 1.4px);
	background-size: 6px 6px;
	mix-blend-mode: multiply;
}

/* ---------- Ink band (open call) ---------- */
.is-style-ink-band {
	background: var(--u-ink);
	color: var(--u-paper);
	padding: clamp(36px, 6vw, 64px) clamp(20px, 4vw, 48px) !important;
}
.is-style-ink-band a:not(.wp-block-button__link) { color: var(--u-paper); }
.is-style-ink-band .is-style-label { color: var(--u-pink); }
.is-style-ink-band h1, .is-style-ink-band h2, .is-style-ink-band h3 { color: var(--u-paper); }
.is-style-ink-band .u-pink-text { color: var(--u-pink); }
.u-mega { margin: 10px 0 0 !important; font-size: clamp(4rem, 9vw, 7rem) !important; line-height: .84 !important; }
.u-band-copy { max-width: 36em; font-size: 1.25rem; }
.is-style-ink-band .wp-block-button__link {
	background: var(--u-pink);
	color: var(--u-ink);
	border-color: var(--u-pink);
}
.is-style-ink-band .wp-block-button__link:hover { background: var(--u-paper); border-color: var(--u-paper); }

/* ---------- Footer ---------- */
.u-footer {
	margin-top: clamp(64px, 9vw, 112px) !important;
	background: linear-gradient(var(--u-ink), var(--u-ink)) center top / calc(100% - 2 * var(--u-gutter)) 3px no-repeat;
	padding-top: 32px;
	padding-bottom: 48px;
	display: flex;
	flex-wrap: wrap;
	gap: 20px 40px;
	justify-content: space-between;
	align-items: flex-end;
}
.u-footer .u-logo, .u-footer .u-logo a { font-size: 72px !important; margin: 0; text-shadow: 3px 3px 0 var(--u-pink); }
.u-footer p { margin: 0; }
.u-footer-links { font-size: .95rem; }
.u-footer-links a { margin-right: 18px; }

/* ---------- Single article ---------- */
.u-article-head { margin-top: 40px !important; }
.u-article-head .wp-block-post-title { margin: 10px 0 0; font-size: clamp(3rem, 7vw, 5.6rem); line-height: .9; }
.u-article-head .wp-block-post-featured-image { margin: 0 0 24px; }
.u-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 16px; font-style: italic; }
.u-meta > * { margin: 0 !important; }
.u-content {
	font-size: 1.2rem;
	line-height: 1.65;
	max-width: var(--u-wrap);
	margin-inline: auto;
	padding-inline: var(--u-gutter);
	box-sizing: border-box;
}
.u-content > * { max-width: 720px; }
.u-content > .alignwide, .u-content > .alignfull { max-width: none; }
.u-content > p:first-child::first-letter {
	float: left;
	font-family: var(--u-head);
	font-weight: 900;
	font-size: 5.2em;
	line-height: .78;
	padding: 6px 10px 0 0;
	color: var(--u-pink);
}
.u-content h2 { font-size: 2.4rem; margin-top: 1.6em; }
.u-content a { text-decoration-color: var(--u-pink); text-decoration-thickness: 3px; text-underline-offset: 3px; }
/* Highlight toolbar (any colour) = pink highlighter, house style */
mark, mark.has-inline-color { background: var(--u-pink) !important; color: var(--u-ink) !important; padding: 0 .12em; }

/* ---------- Generic polish ---------- */
::selection { background: var(--u-pink); color: var(--u-ink); }
:focus-visible { outline: 3px solid var(--u-blue); outline-offset: 3px; }
.wp-block-post-featured-image img,
.wp-block-post-featured-image a,
.wp-block-image img { display: block; border-radius: 0 !important; }
.wp-block-post-featured-image { border-radius: 0 !important; }

/* ---------- Phones ---------- */
@media (max-width: 600px) {
	.u-hero { gap: 32px; margin-top: 24px !important; }
	.u-photo .u-sticker { width: 78px; height: 78px; font-size: 16px; top: -12px; right: -4px; }
	.u-navbar { gap: 6px 16px; }
	.u-nav, .u-nav .wp-block-navigation-item__content { font-size: 18px; }
	.u-stamps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
	.u-stamp-city, .u-stamp-city a { font-size: 24px; }
	.is-style-placard, .is-style-placard-pink, .is-style-placard-blue { min-height: 150px; }
	.u-placards > * { transform: rotate(-.8deg); }
	.u-placards > :nth-child(even) { transform: rotate(.8deg); }
}
.u-archive { margin-top: 40px !important; }
.u-archive .u-section-title { margin-bottom: 24px; }

/* ---------- Pages ---------- */
.u-page-head { margin-top: 40px !important; }
.u-page-head .wp-block-post-title { margin: 0 0 8px; font-size: clamp(3rem, 8vw, 6rem); line-height: .88; text-shadow: .04em .03em 0 var(--u-pink); }
.u-page-content > p:first-child::first-letter { float: none; font: inherit; color: inherit; padding: 0; }
.u-page-content > * { margin-block-start: 1.1em; }
.u-content h2 { margin-top: 1.4em; }
.u-content h3 { font-size: 1.7rem; margin-top: 1.6em; }
.u-content .is-style-zine-box, .u-content .is-style-ink-band { margin-top: 2em; }
.u-content .is-style-ink-band h2 { margin-top: .2em; font-size: clamp(2.2rem, 5vw, 3.4rem); }
.u-content li { margin-bottom: .45em; }
.u-content .u-standfirst { font-size: 1.4rem; }
