/* ==========================================================================
   Hljómblik – site styles
   Old type, new colour: Garamond for reading, bold Plex for display,
   and a palette lifted from the covers of his own songbooks.
   ========================================================================== */

:root {
	--hb-rule: 1px solid var(--wp--preset--color--line);
	--hb-ink-rule: 1.5px solid var(--wp--preset--color--contrast);
	--hb-sans: var(--wp--preset--font-family--sans);
	--hb-mono: var(--wp--preset--font-family--mono);
	/* His book covers side by side, like spines on a shelf */
	--hb-spines: linear-gradient(90deg,
		var(--wp--preset--color--accent) 0 22%,
		var(--wp--preset--color--yellow) 22% 41%,
		var(--wp--preset--color--orange) 41% 57%,
		var(--wp--preset--color--accent-2) 57% 68%,
		var(--wp--preset--color--green) 68% 84%,
		var(--wp--preset--color--pink) 84% 92%,
		var(--wp--preset--color--sky) 92% 100%);
}

body {
	font-feature-settings: "kern", "liga", "onum";
	-webkit-font-smoothing: antialiased;
}

::selection { background: var(--wp--preset--color--note); }

a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }

/* ---------- Small utilities ---------- */

.hb-eyebrow {
	font-family: var(--hb-mono);
	font-size: 0.75rem !important;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin-bottom: 0.25rem;
}
.hb-eyebrow a { color: inherit; text-decoration: none; }
.hb-eyebrow a:hover { color: var(--wp--preset--color--accent); }

.hb-mono { font-family: var(--hb-mono); }
.hb-sans { font-family: var(--hb-sans); }

.hb-lede {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.45;
	color: var(--wp--preset--color--contrast);
}

.hb-note {
	box-sizing: border-box;
	background: var(--wp--preset--color--note);
	border-left: 3px solid var(--wp--preset--color--accent);
	border-radius: 0 8px 8px 0;
	padding: 1rem 1.25rem;
	font-family: var(--hb-sans);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
}

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

.hb-header {
	border-bottom: var(--hb-rule);
	background: color-mix(in srgb, var(--wp--preset--color--base) 82%, transparent);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	backdrop-filter: saturate(1.4) blur(14px);
	position: sticky;
	top: 0;
	z-index: 20;
}
.admin-bar .hb-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .hb-header { top: 0; position: relative; } }
header.wp-block-template-part:has(.hb-header) { display: contents; }
/* Logo: the portrait from the old site, shown small (150px source → 2× density) beside the wordmark */
.hb-portrait { margin: 0; line-height: 0; }
.hb-portrait img {
	width: 60px;
	height: 60px;
	object-fit: cover;
	filter: contrast(1.04);
	-webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
	mask-image: linear-gradient(to bottom, #000 72%, transparent);
}
.hb-brand .wp-block-site-title { line-height: 1; margin: 0 0 0 -0.02em; }
.hb-brand .wp-block-site-title a { font-kerning: normal; }
@media (max-width: 480px) {
	.hb-portrait img { width: 46px; height: 46px; }
	.hb-logo { gap: 0.6rem !important; }
	.hb-brand .wp-block-site-title { font-size: 1.15rem !important; letter-spacing: 0.14em !important; }
	.hb-header .hb-tagline { font-size: 0.5625rem; letter-spacing: 0.03em; }
	.hb-header > .wp-block-group { flex-wrap: nowrap; }
}
.hb-tagline {
	font-family: var(--hb-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin-top: 0.35rem !important;
}

.hb-nav .wp-block-navigation-item__content {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	padding: 0.25rem 0;
	background: linear-gradient(currentColor, currentColor) left bottom / 0 1.5px no-repeat;
	transition: background-size .25s ease, color .15s;
}
.hb-nav .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--accent);
	background-size: 100% 1.5px;
}
.hb-nav .current-menu-item > .wp-block-navigation-item__content,
.hb-nav .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--wp--preset--color--accent);
	background-size: 100% 1.5px;
}
.hb-nav .hb-nav-lang > .wp-block-navigation-item__content {
	font-family: var(--hb-mono);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}
/* ---------- Mobile menu (inc/mobile-menu.php) ---------- */

.hb-mm-toggle { display: none; }

@media (max-width: 781px) {
	.hb-header .hb-nav { display: none; }
	.hb-header > .wp-block-group { flex-wrap: nowrap; }

	.hb-mm-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		margin-right: -10px;
		padding: 0;
		border: 0;
		background: none;
		color: var(--wp--preset--color--contrast);
		cursor: pointer;
	}
}
.hb-mm-burger { display: grid; gap: 7px; width: 24px; }
.hb-mm-burger span { display: block; height: 1.75px; border-radius: 1px; background: currentColor; }

html.hb-mm-locked, html.hb-mm-locked body { overflow: hidden; }

.hb-mm {
	position: fixed;
	inset: 0;
	z-index: 100000; /* above the admin bar */
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-family: var(--hb-sans);
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity .28s ease, transform .32s cubic-bezier(.2,.7,.2,1);
}
.hb-mm.is-open { opacity: 1; transform: none; }
.hb-mm[hidden] { display: none; }

.hb-mm-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: var(--wp--preset--spacing--30) max(1.25rem, env(safe-area-inset-right)) var(--wp--preset--spacing--30) max(1.25rem, env(safe-area-inset-left));
	border-bottom: var(--hb-rule);
	flex: none;
}
.hb-mm-brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: inherit;
	text-decoration: none;
}
.hb-mm-portrait {
	width: 46px;
	height: 46px;
	object-fit: cover;
	-webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
	mask-image: linear-gradient(to bottom, #000 72%, transparent);
}
.hb-mm-title {
	font-size: 1.15rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	line-height: 1;
}
.hb-mm-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-right: -10px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

.hb-mm-body {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding-bottom: max(2rem, env(safe-area-inset-bottom));
}
.hb-mm-body ul { list-style: none; margin: 0; padding: 0; }

/* Primary rows: big, ruled, chevron right; a palette colour bar slides in on the active row */
.hb-mm-primary li { border-bottom: var(--hb-rule); }
.hb-mm-primary a {
	--hb-mm-c: var(--wp--preset--color--accent);
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.15rem 1.25rem;
	color: inherit;
	text-decoration: none;
	font-size: 1.5rem;
	font-weight: 400;
	letter-spacing: -0.015em;
	line-height: 1.2;
	transition: color .15s, padding .25s ease;
}
.hb-mm-primary a::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: var(--hb-mm-c);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform .25s ease;
}
.hb-mm-primary li:nth-child(6n+2) a { --hb-mm-c: var(--wp--preset--color--orange); }
.hb-mm-primary li:nth-child(6n+3) a { --hb-mm-c: var(--wp--preset--color--green); }
.hb-mm-primary li:nth-child(6n+4) a { --hb-mm-c: var(--wp--preset--color--accent-2); }
.hb-mm-primary li:nth-child(6n+5) a { --hb-mm-c: var(--wp--preset--color--pink); }
.hb-mm-primary li:nth-child(6n+6) a { --hb-mm-c: var(--wp--preset--color--yellow); }
.hb-mm-primary a:hover,
.hb-mm-primary a:focus-visible,
.hb-mm-primary a[aria-current="page"] { padding-left: 1.6rem; }
.hb-mm-primary a:hover::before,
.hb-mm-primary a:focus-visible::before,
.hb-mm-primary a[aria-current="page"]::before { transform: scaleY(1); }
.hb-mm-primary a[aria-current="page"] { font-weight: 600; }
.hb-mm-chev { flex: none; color: var(--wp--preset--color--muted); transition: transform .2s ease, color .15s; }
.hb-mm-primary a:hover .hb-mm-chev { transform: translateX(3px); color: var(--hb-mm-c); }

/* Secondary links in two columns */
.hb-mm-secondary {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.1rem 1.25rem;
	padding: 2.25rem 1.25rem 2rem !important;
}
.hb-mm-secondary a {
	color: inherit;
	text-decoration: none;
	font-size: 1rem;
	overflow-wrap: anywhere;
}
.hb-mm-secondary a:hover,
.hb-mm-secondary a[aria-current="page"] { color: var(--wp--preset--color--accent); }

/* Photo strip from the front-page hero, same duotones */
.hb-mm-photos {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-left: 1.25rem;
	padding: 0 1.25rem;
	scrollbar-width: none;
}
.hb-mm-photos::-webkit-scrollbar { display: none; }
.hb-mm-photos figure {
	flex: 0 0 72%;
	margin: 0;
	aspect-ratio: 4 / 3;
	scroll-snap-align: start;
	isolation: isolate;
	background: var(--wp--preset--color--accent);
	overflow: hidden;
}
.hb-mm-photos figure:nth-child(even) { background: var(--wp--preset--color--orange); }
.hb-mm-photos img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 30%;
	filter: grayscale(1) contrast(1.25) brightness(1.15);
	mix-blend-mode: multiply;
}
.hb-mm-photos figure:first-child { background: none; }
.hb-mm-photos figure:first-child img { filter: grayscale(1) contrast(1.08); mix-blend-mode: normal; }

@media (prefers-reduced-motion: reduce) {
	.hb-mm, .hb-mm-primary a, .hb-mm-primary a::before, .hb-mm-chev { transition: none; }
	.hb-mm { transform: none; }
}

/* ---------- Page titles ---------- */

.hb-page-title {
	padding-bottom: 1.25rem;
	border-bottom: var(--hb-ink-rule);
	margin-bottom: var(--wp--preset--spacing--50) !important;
}
.hb-main > .hb-eyebrow + .hb-page-title,
.hb-main > .wp-block-post-date + .hb-page-title { margin-top: 0.25rem; }

.hb-main .wp-block-post-content > h2 {
	margin-top: var(--wp--preset--spacing--60);
}
.hb-main .wp-block-post-content > h3 {
	margin-top: var(--wp--preset--spacing--50);
}

/* Drop cap on the first paragraph of long reading pages */
.hb-dropcap::first-letter {
	float: left;
	font-size: 4.6em;
	line-height: 0.82;
	padding: 0.06em 0.12em 0 0;
	color: var(--wp--preset--color--accent-2);
	font-weight: 500;
}

/* ---------- Front page ---------- */

.hb-hero {
	position: relative;
	margin-top: 0 !important;
	border-bottom: var(--hb-rule);
}
.hb-hero.wp-block-cover { min-height: clamp(520px, 78vh, 820px) !important; padding-bottom: var(--wp--preset--spacing--60); }
.hb-hero .wp-block-cover__inner-container {
	width: 100% !important;
	max-width: 1180px;
	margin-inline: auto !important;
}
.hb-hero .wp-block-cover__image-background {
	filter: grayscale(1) contrast(1.12) brightness(.95);
}
/* Archive photo under a modern gradient: ink at the bottom, a cobalt cast on top */
.hb-hero .wp-block-cover__background.has-background-dim {
	opacity: 1 !important;
	background:
		linear-gradient(to top, rgba(18, 20, 23, .94) 0%, rgba(18, 20, 23, .55) 45%, rgba(18, 20, 23, .2) 100%),
		linear-gradient(120deg, rgba(44, 67, 200, .35), rgba(44, 67, 200, 0) 60%) !important;
}
.hb-hero h1 {
	font-size: clamp(2.8rem, 7.5vw, 6.25rem);
	line-height: .98;
	letter-spacing: -0.035em;
	font-weight: 500;
	max-width: 13ch;
}
.hb-hero .hb-years { color: var(--wp--preset--color--accent-2); }
.hb-hero .hb-eyebrow { color: rgba(244, 244, 241, .8); }
.hb-hero p { max-width: 38rem; }
.hb-hero .wp-block-cover__inner-container > * { margin-left: 0 !important; }
.hb-hero .hb-lede { color: var(--wp--preset--color--base); }
.hb-hero .is-style-outline .wp-block-button__link { color: var(--wp--preset--color--base); border-color: rgba(244, 244, 241, .6); background: transparent; }
.hb-hero .is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); }
.hb-hero .wp-block-buttons .wp-block-button:first-child .wp-block-button__link { background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); }
.hb-hero .wp-block-buttons .wp-block-button:first-child .wp-block-button__link:hover { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--base); }
.hb-front > .wp-block-post-content > .hb-hero:first-child { margin-top: 0 !important; }

.hb-years {
	font-family: var(--hb-mono);
	font-size: 0.8125rem;
	letter-spacing: .06em;
}

.hb-stats {
	border-top: 2px solid var(--wp--preset--color--accent);
	border-bottom: var(--hb-rule);
}
.hb-stats .wp-block-column {
	padding: 1.5rem 0;
}
.hb-stats .wp-block-column + .wp-block-column {
	border-left: var(--hb-rule);
	padding-left: 1.5rem;
}
.hb-stat-number {
	font-size: clamp(2.25rem, 4vw, 3.25rem);
	line-height: 1;
	font-weight: 500;
	margin: 0;
	font-feature-settings: "lnum";
	white-space: nowrap;
}
.hb-stat-label {
	font-family: var(--hb-sans);
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
	margin-top: 0.4rem !important;
}
@media (max-width: 781px) {
	.hb-stats .wp-block-column + .wp-block-column {
		border-left: 0;
		border-top: var(--hb-rule);
		padding-left: 0;
	}
}

.hb-section-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	border-bottom: var(--hb-ink-rule);
	padding-bottom: 0.75rem;
}
.hb-section-head h2 { margin: 0; }
.hb-section-head a {
	font-family: var(--hb-sans);
	font-size: 0.875rem;
	white-space: nowrap;
}

.hb-card {
	border-top: var(--hb-rule);
	padding-top: 1.25rem;
	transition: transform .25s ease;
}
.hb-card:hover { transform: translateY(-3px); }
.hb-card img { border-radius: 8px; }
.hb-card h3 { margin-top: 0.25rem; }
.hb-card h3 a { color: inherit; text-decoration: none; }
.hb-card h3 a:hover { color: var(--wp--preset--color--accent); }
.hb-card p { font-size: var(--wp--preset--font-size--small); }

.hb-figure-tilt img {
	border-radius: 10px;
	box-shadow: 0 30px 60px -30px rgba(18, 20, 23, .5);
}

.hb-pullquote.wp-block-quote {
	border-left: 0;
	padding-left: 0;
	border-top: var(--hb-ink-rule);
	border-bottom: var(--hb-rule);
	padding: var(--wp--preset--spacing--50) 0;
	text-align: left;
}
.hb-pullquote p {
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	line-height: 1.25;
	font-style: italic;
}
.hb-pullquote cite {
	font-family: var(--hb-mono);
	font-style: normal;
	font-size: 0.75rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

/* ---------- Timeline (Æviágrip) ---------- */

.hb-timeline {
	list-style: none;
	padding: 0;
	margin: 0;
	border-top: var(--hb-ink-rule);
}
.hb-timeline li {
	position: relative;
	padding-left: 7rem !important;
	padding: 0.7rem 0;
	border-bottom: var(--hb-rule);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.45;
}
.hb-timeline li strong {
	position: absolute;
	left: 0;
	top: 0.75rem;
	font-family: var(--hb-mono);
	font-weight: 500;
	color: var(--wp--preset--color--accent);
	font-size: 0.875rem;
}

/* ---------- Verse and long documents (Skrif) ---------- */

.hb-verse { font-size: var(--wp--preset--font-size--medium); }
.hb-verse > p { margin-block: 0 !important; line-height: 1.55; }
.hb-verse > p.hb-stanza { height: 1.1em; }
.hb-verse > .hb-verse-indent { padding-left: 2.5em; }
.hb-verse > h2, .hb-verse > h3 { margin-top: 2rem; }

.hb-year-head {
	font-family: var(--hb-mono);
	font-size: 0.875rem !important;
	font-weight: 500;
	letter-spacing: .06em;
	color: var(--wp--preset--color--accent);
	border-bottom: var(--hb-rule);
	padding-bottom: .4rem;
}

.hb-signature img { mix-blend-mode: multiply; opacity: .85; }

/* ---------- Bibliography (Útgáfa) ---------- */

.hb-biblio { border-top: var(--hb-ink-rule); }
.hb-biblio-item {
	display: grid;
	grid-template-columns: 4.5rem 1fr;
	gap: 1rem;
	padding: 1.1rem 0;
	border-bottom: var(--hb-rule);
	margin: 0 !important;
}
.hb-biblio-item .hb-biblio-year {
	font-family: var(--hb-mono);
	font-size: 0.875rem;
	color: var(--wp--preset--color--accent);
	padding-top: 0.3rem;
}
.hb-biblio-item h3 {
	font-size: var(--wp--preset--font-size--large);
	margin: 0 0 0.15rem;
}
.hb-biblio-item h3 a { color: inherit; }
.hb-biblio-item p {
	margin: 0;
	font-family: var(--hb-sans);
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
}

/* ---------- Index lists (Skrif, English) ---------- */

.hb-index {
	list-style: none;
	padding: 0;
	margin: 0;
	border-top: var(--hb-ink-rule);
	counter-reset: hbidx;
}
.hb-index li {
	counter-increment: hbidx;
	display: grid;
	grid-template-columns: 2.5rem 1fr;
	gap: 0.75rem;
	padding: 0.85rem 0;
	border-bottom: var(--hb-rule);
}
.hb-index li::before {
	content: counter(hbidx, decimal-leading-zero);
	font-family: var(--hb-mono);
	font-size: 0.75rem;
	color: var(--wp--preset--color--muted);
	padding-top: 0.35rem;
}
.hb-index a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--medium);
}
.hb-index a:hover { color: var(--wp--preset--color--accent); }
.hb-index small {
	display: block;
	font-family: var(--hb-sans);
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
}

/* ---------- Board (Um sjóðinn) ---------- */

.hb-board .wp-block-column {
	border-top: var(--hb-ink-rule);
	padding-top: 1rem;
}
.hb-board h3 { margin: 0.2rem 0 0.4rem; font-size: var(--wp--preset--font-size--large); }
.hb-board p { font-family: var(--hb-sans); font-size: 0.875rem; margin: 0; }

/* ---------- News ---------- */

.hb-news .wp-block-post-template { gap: 0; }
.hb-news-item {
	display: grid !important;
	grid-template-columns: 200px 1fr;
	gap: 1.75rem;
	padding: 1.75rem 0;
	border-bottom: var(--hb-rule);
}
.hb-news .wp-block-post-template > li:first-child .hb-news-item { border-top: var(--hb-ink-rule); }
.hb-news-item .wp-block-post-title { margin: 0; }
.hb-news-item .wp-block-post-excerpt { margin-top: 0.25rem; }
.hb-news-item .wp-block-post-excerpt__more-link {
	font-family: var(--hb-sans);
	font-size: 0.8125rem;
}
.hb-news-thumb img { background: var(--wp--preset--color--base-2); }
.hb-news-item:not(:has(.hb-news-thumb)) { grid-template-columns: 1fr; }
@media (max-width: 600px) {
	.hb-news-item { grid-template-columns: 1fr; gap: 1rem; }
}
.hb-single-image img { max-height: 520px; width: auto !important; }

.wp-block-query-pagination {
	font-family: var(--hb-sans);
	font-size: 0.875rem;
	margin-top: 2rem;
}

/* ---------- Content tables (imported) ---------- */

.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}
.wp-block-table td,
.wp-block-table th {
	border: 0;
	border-bottom: var(--hb-rule);
	padding: 0.5rem 0.75rem 0.5rem 0;
	text-align: left;
	vertical-align: top;
}
.wp-block-table thead {
	border-bottom: var(--hb-ink-rule);
	font-family: var(--hb-sans);
	font-size: 0.8125rem;
}

/* ---------- Gallery ---------- */

.hb-gallery figure img {
	filter: grayscale(.85);
	transition: filter .2s;
}
.hb-gallery figure:hover img { filter: none; }
.wp-block-gallery.hb-gallery figcaption {
	font-family: var(--hb-sans) !important;
	font-size: 0.75rem !important;
}

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

.hb-footer a { color: var(--wp--preset--color--base); }
.hb-footer a:hover { color: #9DAEFF; }
.hb-footer .hb-eyebrow { color: rgba(244, 244, 241, .55); }
.hb-footer-muted { color: rgba(244, 244, 241, .7); }
.hb-footer-title { margin: 0 0 .5rem; line-height: 1; }
.hb-footer-links {
	list-style: none;
	padding: 0;
	font-size: var(--wp--preset--font-size--small);
}
.hb-footer-links li { margin: 0.2rem 0; }
.hb-footer-rule {
	border-color: rgba(244, 244, 241, .15) !important;
	margin-top: var(--wp--preset--spacing--50) !important;
}

/* Hero sits flush under the header */
main.hb-front { margin-block-start: 0 !important; }

/* ---------- Modern details ---------- */

html { scroll-behavior: smooth; }
:focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; border-radius: 2px; }

.wp-block-image img,
.wp-block-post-featured-image img { border-radius: 6px; }

.wp-element-button,
.wp-block-button__link { transition: background-color .2s, color .2s, transform .2s; }
.wp-block-button__link:hover { transform: translateY(-1px); }
.is-style-outline > .wp-block-button__link { border-width: 1.5px; }

.hb-section-head a {
	text-decoration: none;
	font-weight: 500;
}

.hb-stat-number { letter-spacing: -0.03em; }

.hb-footer { position: relative; }
.hb-footer::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: var(--hb-spines);
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.hb-card, .wp-block-button__link, .hb-nav .wp-block-navigation-item__content { transition: none; }
	.hb-card:hover, .wp-block-button__link:hover { transform: none; }
}

/* ==========================================================================
   Colour
   ========================================================================== */

/* Spine stripe across the very top of the page */
.hb-header::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	background: var(--hb-spines);
}

/* Old-style italic serif inside the bold sans display headings */
h1 em, h2 em {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 400;
	letter-spacing: -0.01em;
}

/* Highlighter marker under a key word */
mark.hb-mark,
.hb-mark {
	background: linear-gradient(transparent 62%, var(--wp--preset--color--yellow) 62% 90%, transparent 90%);
	color: inherit;
	padding: 0 .05em;
}

/* Small label with a short black bar above it */
.hb-kicker {
	font-family: var(--hb-sans);
	font-size: 0.8125rem !important;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.35;
}
.hb-kicker::before {
	content: "";
	display: block;
	width: 2.25rem;
	height: 4px;
	background: var(--wp--preset--color--contrast);
	margin-bottom: .75rem;
}

/* Page titles: short yellow bar instead of a full ink rule */
.hb-page-title {
	border-bottom: 0;
	padding-bottom: 0;
}
.hb-page-title::after {
	content: "";
	display: block;
	width: 4.5rem;
	height: 6px;
	margin-top: 1.1rem;
	background: var(--wp--preset--color--yellow);
}

/* ---------- Front page hero: text + mosaic ---------- */

.hb-hero2 {
	margin-top: 0 !important;
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--40);
}
.hb-hero2 h1 {
	font-size: clamp(2.5rem, 5.2vw, 4.5rem);
	line-height: 1.02;
	letter-spacing: -0.02em;
	margin-block: 1rem 0;
}
.hb-hero2 h1 em { display: block; }
.hb-hero2 .hb-years {
	font-family: var(--hb-mono);
	font-size: 0.875rem;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--muted);
	margin-top: 1rem;
}
.hb-hero2 .hb-lede {
	font-size: 1.1875rem;
	line-height: 1.55;
	color: var(--wp--preset--color--muted);
	max-width: 30rem;
	margin-top: 1.75rem;
}
.hb-hero2 .wp-block-buttons { margin-top: 2rem; }

.wp-block-gallery.hb-mosaic {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(4, 1fr);
	gap: 8px !important;
	aspect-ratio: 1 / 1.08;
	margin: 0;
}
.wp-block-gallery.hb-mosaic > figure.wp-block-image {
	width: auto !important;
	height: 100% !important;
	margin: 0 !important;
	overflow: hidden;
	border-radius: 4px;
	position: relative;
}
.wp-block-gallery.hb-mosaic > figure.wp-block-image img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	border-radius: 0;
	transition: transform .5s ease, filter .4s;
}
.wp-block-gallery.hb-mosaic > figure:hover img { transform: scale(1.05); }

/* Placement: portrait in the middle, photos around it */
.hb-mosaic > figure:nth-child(1) { grid-column: 2 / 4; grid-row: 1 / 4; }
.hb-mosaic > figure:nth-child(2) { grid-column: 1;     grid-row: 1 / 3; }
.hb-mosaic > figure:nth-child(3) { grid-column: 4;     grid-row: 1; }
.hb-mosaic > figure:nth-child(4) { grid-column: 4;     grid-row: 2; }
.hb-mosaic > figure:nth-child(5) { grid-column: 1;     grid-row: 3; }
.hb-mosaic > figure:nth-child(6) { grid-column: 2 / 4; grid-row: 4; }
.hb-mosaic > figure:nth-child(7) { grid-column: 4;     grid-row: 3 / 5; }
.hb-mosaic > figure:nth-child(8) { grid-column: 1;     grid-row: 4; }
.hb-mosaic > figure:nth-child(n+9) { display: none; }

/* The portrait stays black and white */
.hb-mosaic > figure:nth-child(1) img { filter: grayscale(1) contrast(1.08); object-position: 50% 30%; }

/* Every photo around the portrait becomes a blue or orange duotone,
   alternating so neighbouring tiles never share a colour. */
.hb-mosaic > figure:nth-child(n+2) {
	isolation: isolate;
	background: var(--wp--preset--color--accent);
}
.hb-mosaic > figure:nth-child(2),
.hb-mosaic > figure:nth-child(3),
.hb-mosaic > figure:nth-child(7),
.hb-mosaic > figure:nth-child(8) { background: var(--wp--preset--color--orange); }
.hb-mosaic > figure:nth-child(n+2) img {
	filter: grayscale(1) contrast(1.25) brightness(1.15);
	mix-blend-mode: multiply;
}
.hb-mosaic > figure:nth-child(n+2):hover img { mix-blend-mode: normal; filter: grayscale(1); }

/* Keep faces in frame */
.hb-mosaic > figure:nth-child(2) img { object-position: 0% 50%; }
.hb-mosaic > figure:nth-child(3) img { object-position: 50% 20%; }
.hb-mosaic > figure:nth-child(4) img { object-position: 5% 50%; }
.hb-mosaic > figure:nth-child(7) img { object-position: 50% 15%; }

@media (max-width: 781px) {
	.hb-hero2 { padding-top: var(--wp--preset--spacing--50); }
	.wp-block-gallery.hb-mosaic { gap: 5px !important; }
}

/* ---------- Stats as colour tiles ---------- */

.hb-stats {
	border: 0 !important;
	gap: 8px !important;
}
.hb-stats .wp-block-column,
.hb-stats .wp-block-column + .wp-block-column {
	border: 0 !important;
	padding: 1.75rem 1.5rem 1.5rem !important;
	border-radius: 4px;
	color: var(--wp--preset--color--contrast);
}
.hb-stats .wp-block-column:nth-child(4n+1) { background: var(--wp--preset--color--yellow); }
.hb-stats .wp-block-column:nth-child(4n+2) { background: var(--wp--preset--color--sky); }
.hb-stats .wp-block-column:nth-child(4n+3) { background: var(--wp--preset--color--peach); }
.hb-stats .wp-block-column:nth-child(4n+4) { background: var(--wp--preset--color--pink); }
.hb-stat-number {
	font-family: var(--hb-sans);
	font-weight: 600;
	font-size: clamp(2.5rem, 4.5vw, 3.75rem);
	letter-spacing: -0.04em;
}
.hb-stat-label { color: inherit; opacity: .8; }

/* ---------- Section heads ---------- */

.hb-section-head {
	border-bottom: 0;
	padding-bottom: 0;
	padding-top: 1rem;
	position: relative;
}
.hb-section-head::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 2.25rem;
	height: 4px;
	background: var(--wp--preset--color--contrast);
}

/* ---------- Content cards: big coloured numerals ---------- */

.hb-card {
	--hb-card-c: var(--wp--preset--color--accent);
	border-top: 6px solid var(--hb-card-c);
	padding: 1.5rem 1.5rem 1.25rem;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 1px 0 var(--wp--preset--color--line);
	height: 100%;
	box-sizing: border-box;
}
.hb-card:hover { box-shadow: 0 24px 40px -28px rgba(18, 20, 23, .35); }
.hb-card .hb-eyebrow {
	font-family: var(--hb-sans);
	font-size: 3rem !important;
	font-weight: 600;
	letter-spacing: -0.04em;
	line-height: 1;
	color: var(--hb-card-c);
	margin-bottom: .5rem;
}
.hb-card h3 a:hover { color: var(--hb-card-c); }
.wp-block-columns .wp-block-column:nth-child(1) > .hb-card { --hb-card-c: var(--wp--preset--color--accent); }
.wp-block-columns .wp-block-column:nth-child(2) > .hb-card { --hb-card-c: var(--wp--preset--color--orange); }
.wp-block-columns .wp-block-column:nth-child(3) > .hb-card { --hb-card-c: var(--wp--preset--color--green); }
.wp-block-columns + .wp-block-columns .wp-block-column:nth-child(1) > .hb-card { --hb-card-c: var(--wp--preset--color--accent-2); }
.wp-block-columns + .wp-block-columns .wp-block-column:nth-child(2) > .hb-card { --hb-card-c: var(--wp--preset--color--pink); }
.wp-block-columns + .wp-block-columns .wp-block-column:nth-child(3) > .hb-card { --hb-card-c: #C99212; }

/* Front-page news cards: thumbnail beside the text */
.hb-news-card {
	display: grid;
	grid-template-columns: 9.5rem 1fr;
	gap: 1.5rem;
	align-items: start;
}
.hb-news-card > * { margin: 0 !important; }
.hb-news-card-img img { border-radius: 4px; background: var(--wp--preset--color--base-2); }
.hb-news-card-body .wp-block-post-title { margin-top: 0.35rem; }
.hb-news-card:not(:has(.hb-news-card-img)) { grid-template-columns: 1fr; }
@media (max-width: 520px) {
	.hb-news-card { grid-template-columns: 5.5rem 1fr; gap: 1rem; }
}

/* ---------- Pull quote on a blue block ---------- */

.hb-pullquote.wp-block-quote {
	background: var(--wp--preset--color--accent);
	color: #fff;
	border: 0;
	border-radius: 4px;
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50) var(--wp--preset--spacing--50);
	position: relative;
}
.hb-pullquote.wp-block-quote::before {
	content: "\201C";
	position: absolute;
	top: -.15em;
	left: var(--wp--preset--spacing--50);
	font-family: var(--wp--preset--font-family--serif);
	font-size: 9rem;
	line-height: 1;
	color: var(--wp--preset--color--yellow);
}
.hb-pullquote p { color: #fff; }
.hb-pullquote cite { color: rgba(255, 255, 255, .75); }

/* ---------- Other pages pick up colour too ---------- */

.hb-timeline { border-top: 4px solid var(--wp--preset--color--yellow); }
.hb-timeline li strong { color: var(--wp--preset--color--accent); font-weight: 600; }
.hb-biblio { border-top: 4px solid var(--wp--preset--color--orange); }
.hb-index { border-top: 4px solid var(--wp--preset--color--accent); }
.hb-index li:nth-child(5n+1)::before { color: var(--wp--preset--color--accent); }
.hb-index li:nth-child(5n+2)::before { color: var(--wp--preset--color--orange); }
.hb-index li:nth-child(5n+3)::before { color: var(--wp--preset--color--green); }
.hb-index li:nth-child(5n+4)::before { color: var(--wp--preset--color--accent-2); }
.hb-index li:nth-child(5n+5)::before { color: var(--wp--preset--color--pink); }
.hb-board .wp-block-column { border-top: 4px solid var(--wp--preset--color--sky); }
.hb-board .wp-block-column:nth-child(2) { border-top-color: var(--wp--preset--color--yellow); }
.hb-board .wp-block-column:nth-child(3) { border-top-color: var(--wp--preset--color--pink); }
.hb-board .wp-block-column:nth-child(4) { border-top-color: var(--wp--preset--color--green); }
.hb-note { border-left-color: var(--wp--preset--color--yellow); }
.hb-news .wp-block-post-template > li:first-child .hb-news-item { border-top: 4px solid var(--wp--preset--color--accent); }

/* Verkaskrá: each category gets its own colour */
.hb-vk-sec-head { border-bottom-width: 4px !important; }
.hb-vk-sec:nth-of-type(6n+1) .hb-vk-sec-head { border-bottom-color: var(--wp--preset--color--accent); }
.hb-vk-sec:nth-of-type(6n+2) .hb-vk-sec-head { border-bottom-color: var(--wp--preset--color--orange); }
.hb-vk-sec:nth-of-type(6n+3) .hb-vk-sec-head { border-bottom-color: var(--wp--preset--color--green); }
.hb-vk-sec:nth-of-type(6n+4) .hb-vk-sec-head { border-bottom-color: var(--wp--preset--color--yellow); }
.hb-vk-sec:nth-of-type(6n+5) .hb-vk-sec-head { border-bottom-color: var(--wp--preset--color--pink); }
.hb-vk-sec:nth-of-type(6n+6) .hb-vk-sec-head { border-bottom-color: var(--wp--preset--color--accent-2); }
.hb-vk .hb-vk-sec-head h2 { font-family: var(--hb-sans); font-weight: 600; letter-spacing: -0.03em; }
.hb-vk .hb-vk-dec[aria-pressed="true"] { background: var(--wp--preset--color--accent); border-color: var(--wp--preset--color--accent); color: #fff; }

/* Left/right-aligned images float inside the text column, not at the page edge */
.wp-block-post-content.alignfull > .alignright {
	margin-right: max(var(--wp--style--root--padding-right, 0px), calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
	margin-left: 2rem;
	max-width: 45%;
}
.wp-block-post-content.alignfull > .alignleft {
	margin-left: max(var(--wp--style--root--padding-left, 0px), calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
	margin-right: 2rem;
	max-width: 45%;
}
.wp-block-post-content.alignfull > .alignright img,
.wp-block-post-content.alignfull > .alignleft img { width: 100%; height: auto; }
.wp-block-post-content > .wp-block-heading { clear: both; }
/* Photos side by side in columns fill their column, so the row lines up */
.wp-block-post-content .wp-block-column > .wp-block-image img { width: 100%; }
@media (max-width: 600px) {
	.wp-block-post-content.alignfull > .alignright,
	.wp-block-post-content.alignfull > .alignleft {
		float: none;
		max-width: none;
		margin-left: 0 !important;
		margin-right: 0 !important;
		margin-bottom: 1.25rem;
	}
}

/* ---------- Front page: Horfa og hlusta ---------- */

/* Video and Spotify side by side, same height (the video sets it) */
.hb-media .wp-block-column { display: flex; flex-direction: column; }
.hb-media .wp-block-embed { margin: 0; }
.hb-media .wp-block-embed iframe { border-radius: 12px; display: block; }
.hb-media .wp-block-embed-spotify { flex: 1; display: flex; }
.hb-media .wp-block-embed-spotify .wp-block-embed__wrapper { flex: 1; display: flex; }
.hb-media .wp-block-embed-spotify iframe { height: 100%; min-height: 352px; }
.hb-media-cap {
	margin-top: 0.9rem !important;
	font-family: var(--hb-sans);
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
}
.hb-media-cap strong {
	display: block;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.25rem;
	font-weight: 400;
	color: var(--wp--preset--color--contrast);
	margin-bottom: 0.1rem;
}
.hb-media-cap a { color: inherit; }
@media (max-width: 781px) {
	.hb-media .wp-block-columns { gap: var(--wp--preset--spacing--50); }
}
