/*
Theme Name: Ħajt
Theme URI: https://drittgolhajt.com
Update URI: false
Author: Johann Fenech
Description: Block theme for Dritt Ġol-Ħajt, an opinion column from Malta. Concrete grey and flag red, serif columns, no page builder, self-hosted fonts with full Maltese character coverage.
Version: 1.1.3
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hajt
Tags: blog, news, block-patterns, full-site-editing, one-column, wide-blocks, accessibility-ready
*/

/* Newsprint is a light medium; stop forced-dark modes inverting it. */
:root {
	color-scheme: light;
	/* One course of concrete blocks: an 80×20 tile, mortar is whatever sits behind it. */
	--hajt-bricks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='20'%3E%3Cg fill='%233A3F47'%3E%3Crect x='1' y='1' width='38' height='8'/%3E%3Crect x='0' y='11' width='19' height='8' fill='%232E333A'/%3E%3Crect x='21' y='11' width='38' height='8' fill='%23474D56'/%3E%3Crect x='41' y='1' width='38' height='8' fill='%232E333A'/%3E%3Crect x='61' y='11' width='19' height='8' fill='%232E333A'/%3E%3C/g%3E%3C/svg%3E");
	--hajt-sans: var(--wp--preset--font-family--sans);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	font-optical-sizing: auto;
	font-variant-numeric: oldstyle-nums proportional-nums;
	background-color: var(--wp--preset--color--paper);
}
/* A course of wall along the very top of every page. */
.wp-site-blocks::before {
	content: "";
	display: block;
	height: 20px;
	background: var(--hajt-bricks) repeat-x left top;
}
::selection { background: var(--wp--preset--color--brick); color: var(--wp--preset--color--white); }
a { text-decoration-thickness: 1px; text-underline-offset: 0.18em; transition: color .15s ease; }
:where(h1, h2, h3, .wp-block-post-title) { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--wp--preset--color--brick); outline-offset: 3px; }

/* Shared small type: labels, bylines, dates. */
.hajt-label, .hajt-byline, .hajt-reading-time, .hajt-dateline,
.wp-block-post-date, .hajt-tags, .hajt-section-head {
	font-family: var(--hajt-sans);
	font-stretch: 85%;
}
.hajt-label {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	padding: 0.15em 0.55em 0.1em;
	line-height: 1.5;
}
.hajt-meta { gap: 0.35rem 1rem; align-items: baseline; }
.hajt-meta > * { margin: 0 !important; }
.hajt-byline {
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--muted);
}
.hajt-byline span { color: var(--wp--preset--color--ink); font-weight: 700; }
.hajt-reading-time {
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--muted);
}
.hajt-meta > * + *::before { content: "·"; margin-right: 1rem; color: var(--wp--preset--color--rule); }

/* ── Masthead ─────────────────────────────────────────────────────────── */

.hajt-masthead { padding-top: 0.5rem; }
.hajt-topbar {
	border-bottom: 1px solid var(--wp--preset--color--ink);
	padding-block: 0.4rem;
	gap: 0.5rem 1.5rem;
}
.hajt-dateline {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.hajt-utility-nav { font-size: var(--wp--preset--font-size--x-small) !important; }
.hajt-utility-nav a { text-decoration: none; }
.hajt-nameplate { padding-block: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.5rem); gap: 0.6rem; }
.hajt-nameplate .wp-block-site-title { margin: 0; font-variation-settings: "opsz" 72; }
.hajt-nameplate .wp-block-site-title a:hover { color: var(--wp--preset--color--brick); }
.hajt-motto {
	margin: 0;
	font-family: var(--hajt-sans);
	font-stretch: 85%;
	font-size: var(--wp--preset--font-size--small);
	text-transform: uppercase;
	letter-spacing: 0.16em;
	color: var(--wp--preset--color--muted);
}
.hajt-motto em {
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	text-transform: none;
	letter-spacing: 0;
	font-size: 1.2em;
	color: var(--wp--preset--color--brick);
	margin-right: 0.35em;
}
.hajt-sections {
	border-top: 3px solid var(--wp--preset--color--ink);
	border-bottom: 1px solid var(--wp--preset--color--ink);
	padding-block: 0.55rem;
	position: relative;
}
.hajt-sections::before {
	/* The classic newspaper double rule. */
	content: "";
	position: absolute;
	inset: 4px 0 auto;
	border-top: 1px solid var(--wp--preset--color--ink);
}
.hajt-section-nav a { text-decoration: none; }
.hajt-section-nav .current-menu-item a,
.hajt-section-nav a:hover { color: var(--wp--preset--color--brick); }
.hajt-section-nav .wp-block-navigation__responsive-container-open,
.hajt-section-nav .wp-block-navigation__responsive-container-close {
	font-family: var(--hajt-sans);
}
.hajt-section-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.5rem;
}
.hajt-section-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 1.25rem;
	font-size: 1.1rem;
}

/* ── Front page ───────────────────────────────────────────────────────── */

.hajt-lead-row { align-items: flex-start !important; }
.hajt-lead__labels { gap: 0.75rem; align-items: center; }
.hajt-lead__labels > * { margin: 0 !important; }
.hajt-lead__title {
	font-size: clamp(2.4rem, 1.3rem + 4.2vw, 4.6rem) !important;
	line-height: 1.02;
	font-weight: 780;
	letter-spacing: -0.025em;
	margin-block: 1rem 0 !important;
	font-variation-settings: "opsz" 72;
}
.hajt-lead__title a:hover { color: var(--wp--preset--color--brick); }
.hajt-lead__standfirst {
	font-size: var(--wp--preset--font-size--large);
	margin-block: 1.1rem 1.2rem !important;
	color: var(--wp--preset--color--ink) !important;
	opacity: 0.86;
	max-width: 42rem;
}
.hajt-readmore {
	display: inline-block;
	margin-top: 1.4rem;
	font-family: var(--hajt-sans);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	text-decoration: none;
	border-bottom: 2px solid var(--wp--preset--color--brick);
	padding-bottom: 0.15rem;
}

.hajt-aside { border-left: 1px solid var(--wp--preset--color--rule); padding-left: clamp(0rem, 2.5vw, 2.5rem); }
.hajt-wallbox {
	position: relative;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--ink);
	padding: 1.4rem 1.4rem 1.2rem;
	margin-bottom: 2rem;
	box-shadow: 6px 6px 0 var(--wp--preset--color--brick);
}
.hajt-wallbox p { margin: 0; font-size: var(--wp--preset--font-size--small); }
.hajt-wallbox p + p { margin-top: 0.6rem; }
.hajt-wallbox .hajt-wallbox__term {
	font-size: 1.9rem;
	font-weight: 750;
	font-style: italic;
	line-height: 1;
	letter-spacing: -0.01em;
}
.hajt-wallbox .hajt-wallbox__pos {
	margin-top: 0.3rem;
	font-family: var(--hajt-sans);
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--muted);
}
.hajt-wallbox__link a { font-weight: 600; }
.hajt-aside__head { display: inline-block; margin-bottom: 0.75rem !important; }
.hajt-lead__quote { margin-block: 2rem 0 !important; font-size: clamp(1.4rem, 1rem + 1.2vw, 1.9rem); line-height: 1.2; font-weight: 700; }
.hajt-lead__quote blockquote p { margin: 0; }
.hajt-lead__image { margin: 2rem 0 0 !important; max-width: 42rem; }
.hajt-lead__image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.hajt-lead__image a:focus-visible img { outline: 2px solid var(--wp--preset--color--brick); outline-offset: 3px; }
.hajt-sectionlist { list-style: none; padding: 0; margin: 0 0 2rem; }
.hajt-sectionlist li { padding-block: 0.8rem; border-bottom: 1px solid var(--wp--preset--color--rule); }
.hajt-sectionlist a { display: block; font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.hajt-sectionlist a:hover { color: var(--wp--preset--color--brick); }
.hajt-sectionlist span { display: block; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.hajt-pitch { font-size: var(--wp--preset--font-size--small); }
.hajt-shortlist .wp-block-post-template > li {
	padding-block: 0.9rem;
	border-bottom: 1px solid var(--wp--preset--color--rule);
}
.hajt-shortlist .wp-block-post-template > li > * { margin-block: 0.2rem 0; }
.hajt-shortlist .wp-block-post-title { font-size: 1.25rem; line-height: 1.18; }

/* Rule between sections: a course of concrete blocks. */
.wp-block-separator.is-style-bricks {
	width: 100% !important;
	max-width: var(--wp--style--global--wide-size) !important;
	height: 20px;
	border: 0 !important;
	background: var(--hajt-bricks) repeat-x left center;
	opacity: 1;
	margin-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
}
.hajt-section-head {
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	border-bottom: 1px solid var(--wp--preset--color--ink);
	padding-bottom: 0.5rem;
	margin-bottom: 1.5rem !important;
}

.hajt-grid .wp-block-post-template { gap: 2.25rem 2.5rem; }
.hajt-grid .wp-block-post-template > li {
	border-top: 3px solid var(--wp--preset--color--ink);
	padding-top: 0.9rem;
}
.hajt-grid .wp-block-post-template > li > * { margin-block: 0.55rem 0; }
.hajt-grid .wp-block-post-title { font-size: 1.55rem; line-height: 1.12; }
.hajt-grid .wp-block-post-title a:hover { color: var(--wp--preset--color--brick); }
.hajt-grid .wp-block-post-excerpt { font-size: var(--wp--preset--font-size--small); }
.hajt-grid .wp-block-post-excerpt__excerpt { margin: 0; }
.wp-block-query-pagination {
	margin-top: var(--wp--preset--spacing--50);
	font-family: var(--hajt-sans);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: var(--wp--preset--font-size--small);
}

/* ── Single column ────────────────────────────────────────────────────── */

.hajt-article__head { padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40); text-align: center; }
.hajt-article__head > * { margin-inline: auto; }
.hajt-article__title {
	font-size: clamp(2.3rem, 1.2rem + 4vw, 4.25rem) !important;
	font-weight: 780;
	line-height: 1.03;
	letter-spacing: -0.025em;
	margin-block: 1.1rem 0 !important;
	font-variation-settings: "opsz" 72;
}
.hajt-article__standfirst {
	font-size: var(--wp--preset--font-size--large);
	max-width: 38rem;
	margin-block: 1.25rem 1.5rem !important;
}
.hajt-article__standfirst p { margin: 0; }
.hajt-article__head .hajt-meta {
	border-block: 1px solid var(--wp--preset--color--rule);
	padding-block: 0.6rem;
	max-width: 38rem;
}
.hajt-article__image { margin-bottom: var(--wp--preset--spacing--50); }
.wp-site-blocks .wp-block-post-featured-image.hajt-article__image { max-width: 44rem; margin-left: auto; margin-right: auto; }

.hajt-prose { font-size: 1.1875rem; line-height: 1.7; }
.hajt-prose > * + * { margin-block-start: 1.25em; }
.hajt-prose h2 { margin-block-start: 2em; font-size: 1.75rem; }
.hajt-prose h3 { margin-block-start: 1.8em; }
.single .hajt-prose > p:first-of-type::first-letter {
	float: left;
	font-size: 4.6em;
	line-height: 0.82;
	font-weight: 750;
	padding: 0.07em 0.08em 0 0;
	color: var(--wp--preset--color--brick);
	font-variation-settings: "opsz" 72;
}
.hajt-prose a { text-decoration-color: var(--wp--preset--color--brick); text-decoration-thickness: 2px; }
.hajt-prose ul, .hajt-prose ol { padding-left: 1.2em; }
.hajt-prose li + li { margin-top: 0.4em; }
.hajt-prose .wp-block-pullquote { margin-block: 2.2em; text-align: left; }
.hajt-prose .wp-block-pullquote p { font-size: inherit; line-height: inherit; }
.hajt-prose .wp-block-pullquote cite {
	display: block;
	margin-top: 0.8rem;
	font-family: var(--hajt-sans);
	font-style: normal;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--muted);
}

/* Pull quote, sprayed on the wall. */
.wp-block-pullquote.is-style-wall {
	border: 0 !important;
	background:
		linear-gradient(rgba(14, 17, 22, 0.86), rgba(14, 17, 22, 0.86)),
		var(--hajt-bricks) repeat;
	border-left: 6px solid var(--wp--preset--color--brick) !important;
	color: var(--wp--preset--color--white);
	padding: clamp(1.5rem, 4vw, 2.5rem) !important;
}
@media (min-width: 64rem) {
	.hajt-prose .wp-block-pullquote.is-style-wall { max-width: calc(var(--wp--style--global--content-size) + 8rem) !important; }
}
.wp-block-pullquote.is-style-wall blockquote { margin: 0; }
.wp-block-pullquote.is-style-wall p { font-style: italic; }
.wp-block-pullquote.is-style-wall cite { color: var(--wp--preset--color--brick-soft); }

.is-style-kicker {
	font-family: var(--hajt-sans);
	font-stretch: 85%;
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--wp--preset--color--brick);
}
.is-style-standfirst { font-size: var(--wp--preset--font-size--large); font-style: italic; line-height: 1.45; }

.wp-block-group.is-style-note {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--rule);
	border-left: 4px solid var(--wp--preset--color--brick);
	padding: 1.25rem 1.5rem;
}
.wp-block-group.is-style-note > * { margin-block: 0; }
.wp-block-group.is-style-note > * + * { margin-top: 0.6rem; }

/* Sources: the facts each column stands on. */
.wp-block-group.is-style-sources {
	margin-top: 3rem !important;
	border-top: 3px solid var(--wp--preset--color--ink);
	padding-top: 1rem;
	font-family: var(--hajt-sans);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}
.wp-block-group.is-style-sources h2,
.wp-block-group.is-style-sources h3 {
	font-family: var(--hajt-sans);
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	margin: 0 0 0.6rem;
}
.wp-block-group.is-style-sources ol { margin: 0; padding-left: 1.3em; }
.wp-block-group.is-style-sources li + li { margin-top: 0.35em; }
.wp-block-group.is-style-sources a { text-decoration-thickness: 1px; }

.hajt-article__foot { padding-top: var(--wp--preset--spacing--40); }
.hajt-reply { font-size: var(--wp--preset--font-size--small); }
.hajt-reply__head,
.hajt-reply .hajt-reply__head {
	font-family: var(--hajt-sans);
	font-weight: 800;
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: uppercase;
	letter-spacing: 0.14em;
}
.hajt-tags { font-size: var(--wp--preset--font-size--x-small); text-transform: uppercase; letter-spacing: 0.08em; color: var(--wp--preset--color--muted); }
.hajt-more { padding-bottom: var(--wp--preset--spacing--60); }

/* ── Archive, pages ───────────────────────────────────────────────────── */

.hajt-archive__head { padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--30); border-bottom: 3px solid var(--wp--preset--color--ink); margin-bottom: var(--wp--preset--spacing--40); }
.hajt-archive__head .hajt-label { display: inline-block; }
.hajt-archive__head .wp-block-query-title { font-size: var(--wp--preset--font-size--xx-large); margin-top: 0.8rem; }
.hajt-archive__head .wp-block-term-description { font-style: italic; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--large); }
.hajt-list .wp-block-post-template > li {
	padding-block: 1.6rem;
	border-bottom: 1px solid var(--wp--preset--color--rule);
}
.hajt-list .wp-block-post-template > li > * { margin-block: 0.45rem 0; }
.hajt-list .wp-block-post-title { font-size: var(--wp--preset--font-size--x-large); }
.hajt-list .wp-block-post-title a:hover { color: var(--wp--preset--color--brick); }
.hajt-archive { padding-bottom: var(--wp--preset--spacing--60); }

.hajt-page { padding-bottom: var(--wp--preset--spacing--60); }
.hajt-page__head { padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--30); }
.hajt-page__head .wp-block-post-title { font-size: var(--wp--preset--font-size--xx-large); font-variation-settings: "opsz" 72; }
.hajt-404 { padding-block: var(--wp--preset--spacing--60); }

.wp-block-search__input { border: 1px solid var(--wp--preset--color--ink); border-radius: 0; padding: 0.6rem 0.8rem; font: inherit; background: var(--wp--preset--color--surface); }
.wp-block-search__button { margin-left: 0 !important; }

/* ── Footer ───────────────────────────────────────────────────────────── */

.hajt-footer { font-family: var(--hajt-sans); font-size: var(--wp--preset--font-size--small); margin-top: 0 !important; }
.hajt-footer a { text-decoration: none; }
.hajt-footer a:hover { color: var(--wp--preset--color--brick-soft) !important; text-decoration: underline; }
.hajt-footer__name {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 2.4rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
	margin: 0;
}
.hajt-footer__gloss { font-family: var(--wp--preset--font-family--serif); font-size: 1.05rem; opacity: 0.8; max-width: 26rem; }
.hajt-footer__head { font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; font-size: var(--wp--preset--font-size--x-small); opacity: 0.65; margin: 0; }
.hajt-footer__list { list-style: none; padding: 0; margin: 0.6rem 0 0; }
.hajt-footer__list li { margin: 0.35rem 0; }
.hajt-footer .wp-block-separator.is-style-bricks { margin-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--30); }
.hajt-footer__legal { font-size: var(--wp--preset--font-size--x-small); opacity: 0.7; max-width: 44rem; }

/* ── Small screens ────────────────────────────────────────────────────── */

@media (max-width: 781px) {
	.hajt-aside { border-left: 0; padding-left: 0; border-top: 1px solid var(--wp--preset--color--rule); padding-top: 2rem; }
	.hajt-topbar { justify-content: center !important; }
	.hajt-grid .wp-block-post-template { grid-template-columns: 1fr !important; }
	.hajt-sections { padding-block: 0.35rem; }
}
@media (max-width: 599px) {
	.hajt-utility-nav { display: none !important; }
	.hajt-motto em { display: block; margin: 0 0 0.2rem; }
}
