/*
Theme Name: Narethûn
Author: Thorsten Duda
Description: Ein atmosphärisches WordPress-Theme für Narethûn – Das Land, das geblieben ist. Depeschen und Briefe erscheinen auf Pergament und werden mit dem Siegel Narethûns geschlossen.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: narethun
Tags: blog, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
	--night: #0c0a10;
	--night-soft: #16111d;
	--violet: #30213b;
	--violet-light: #594164;
	--gold: #bda05e;
	--gold-bright: #dbc078;
	--parchment: #e5d0a4;
	--parchment-light: #f0dfb9;
	--parchment-dark: #c5a978;
	--ink: #291f1d;
	--ash: #b7acbd;
	--white: #f8f2e7;
	--serif-display: Cinzel, "Trajan Pro", "Palatino Linotype", Palatino, Georgia, serif;
	--serif-reading: "Iowan Old Style", Baskerville, "Times New Roman", Georgia, serif;
	--wrap: min(1120px, calc(100% - 3rem));
	--shadow: 0 24px 70px rgba(0, 0, 0, .38);
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background:
		radial-gradient(circle at 12% 20%, rgba(85, 57, 97, .22), transparent 34rem),
		radial-gradient(circle at 88% 65%, rgba(48, 33, 59, .28), transparent 38rem),
		linear-gradient(135deg, #09070c, #15101b 55%, #0a080d);
	color: var(--white);
	font-family: var(--serif-reading);
	font-size: 18px;
	line-height: 1.72;
	min-height: 100vh;
}

body::before {
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	content: "";
	opacity: .2;
	background-image:
		repeating-linear-gradient(110deg, transparent 0 19px, rgba(255, 255, 255, .018) 20px),
		repeating-linear-gradient(10deg, transparent 0 31px, rgba(255, 255, 255, .012) 32px);
}

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

a {
	color: var(--gold-bright);
	text-decoration-thickness: 1px;
	text-underline-offset: .2em;
}

a:hover,
a:focus-visible {
	color: #f3dc99;
}

button,
input,
textarea,
select {
	font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--serif-display);
	font-weight: 500;
	line-height: 1.18;
	letter-spacing: .045em;
}

.wrap {
	width: var(--wrap);
	margin-inline: auto;
}

.wrap--narrow {
	max-width: 920px;
}

.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;
}

.screen-reader-text:focus {
	top: 1rem;
	left: 1rem;
	z-index: 9999;
	display: block;
	width: auto;
	height: auto;
	clip: auto;
	padding: .75rem 1rem;
	background: var(--parchment);
	color: var(--ink);
}

.site-header {
	position: relative;
	z-index: 20;
	border-bottom: 1px solid rgba(189, 160, 94, .25);
	background: rgba(11, 8, 14, .86);
	backdrop-filter: blur(16px);
}

.site-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: var(--wrap);
	min-height: 94px;
	margin: 0 auto;
}

.site-brand {
	display: flex;
	align-items: center;
	gap: .95rem;
	color: var(--white);
	text-decoration: none;
}

.site-brand__text {
	display: flex;
	flex-direction: column;
}

.site-title {
	font-family: var(--serif-display);
	font-size: clamp(1.35rem, 2.5vw, 1.8rem);
	letter-spacing: .16em;
	line-height: 1;
}

.site-tagline {
	margin-top: .35rem;
	color: var(--ash);
	font-size: .76rem;
	font-style: italic;
	letter-spacing: .075em;
}

.site-brand__sigil,
.title-sigil {
	display: block;
	width: 48px;
	aspect-ratio: 1;
	background: url("assets/images/mu-symbol.svg") center / contain no-repeat;
}

.site-brand__sigil span,
.title-sigil span {
	display: none;
}

.primary-navigation ul {
	display: flex;
	align-items: center;
	gap: clamp(1.1rem, 2.8vw, 2.5rem);
	padding: 0;
	margin: 0;
	list-style: none;
}

.primary-navigation a {
	position: relative;
	color: #d5ccda;
	font-family: var(--serif-display);
	font-size: .74rem;
	letter-spacing: .13em;
	text-decoration: none;
	text-transform: uppercase;
}

.primary-navigation a::after {
	position: absolute;
	right: 50%;
	bottom: -.55rem;
	left: 50%;
	height: 1px;
	content: "";
	background: var(--gold);
	transition: inset .2s ease;
}

.primary-navigation a:hover::after,
.primary-navigation .current-menu-item > a::after,
.primary-navigation .current_page_item > a::after {
	right: 0;
	left: 0;
}

.menu-toggle {
	display: none;
	width: 44px;
	height: 44px;
	padding: 10px;
	border: 1px solid rgba(189, 160, 94, .4);
	background: transparent;
}

.menu-toggle > span:not(.screen-reader-text) {
	display: block;
	height: 1px;
	margin: 5px 0;
	background: var(--gold);
}

.hero {
	position: relative;
	display: grid;
	place-items: center;
	align-content: center;
	min-height: min(780px, calc(100vh - 94px));
	padding: 6rem 1.5rem 7rem;
	overflow: hidden;
	text-align: center;
}

.hero::before {
	position: absolute;
	inset: 0;
	content: "";
	background:
		linear-gradient(to bottom, rgba(10, 7, 12, .1), rgba(10, 7, 12, .78)),
		radial-gradient(ellipse at 50% 42%, rgba(105, 79, 118, .22), transparent 41%),
		linear-gradient(155deg, transparent 0 42%, rgba(189, 160, 94, .035) 42.2% 42.5%, transparent 42.7%),
		linear-gradient(25deg, transparent 0 46%, rgba(189, 160, 94, .025) 46.2% 46.5%, transparent 46.7%);
}

.hero::after {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 36%;
	content: "";
	opacity: .55;
	background:
		linear-gradient(145deg, transparent 35%, #17101e 35.4% 50%, transparent 50.5%) bottom left / 48% 100% no-repeat,
		linear-gradient(215deg, transparent 35%, #120e18 35.4% 54%, transparent 54.5%) bottom right / 58% 88% no-repeat;
	filter: drop-shadow(0 -20px 40px rgba(0, 0, 0, .7));
}

.hero > * {
	position: relative;
	z-index: 2;
}

.hero__ornament {
	width: clamp(110px, 14vw, 155px);
	aspect-ratio: 1;
	margin-bottom: 1.75rem;
	background: url("assets/images/mu-symbol.svg") center / contain no-repeat;
	filter: drop-shadow(0 0 28px rgba(189, 160, 94, .14));
}

.hero__ornament::before {
	display: none;
}

.hero__ornament::after {
	display: none;
}

.eyebrow,
.document-kind {
	margin: 0 0 1rem;
	color: var(--gold);
	font-family: var(--serif-display);
	font-size: .7rem;
	letter-spacing: .23em;
	text-transform: uppercase;
}

.hero h1 {
	margin: 0;
	font-size: clamp(3.4rem, 10vw, 7.8rem);
	letter-spacing: .13em;
	text-shadow: 0 5px 30px rgba(0, 0, 0, .65);
}

.hero__subtitle {
	margin: .3rem 0 1.5rem;
	color: #d8c690;
	font-size: clamp(1.05rem, 2.5vw, 1.5rem);
	font-style: italic;
	letter-spacing: .12em;
}

.hero__lead {
	max-width: 580px;
	margin: 0 auto 2.2rem;
	color: #c1b7c5;
	font-size: clamp(1rem, 2vw, 1.18rem);
}

.scroll-cue,
.button {
	display: inline-flex;
	align-items: center;
	gap: .65rem;
	padding: .75rem 1.1rem;
	border-bottom: 1px solid rgba(189, 160, 94, .5);
	color: var(--gold-bright);
	font-family: var(--serif-display);
	font-size: .72rem;
	letter-spacing: .14em;
	text-decoration: none;
	text-transform: uppercase;
}

.chronicle,
.archive-stage {
	padding-block: clamp(5rem, 10vw, 9rem);
}

.section-heading,
.archive-header {
	max-width: 720px;
	margin: 0 auto clamp(2.5rem, 5vw, 4.5rem);
	text-align: center;
}

.section-heading h2,
.archive-header h1 {
	margin: 0;
	font-size: clamp(2rem, 4.8vw, 3.4rem);
}

.archive-description {
	color: var(--ash);
}

.document-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(1.5rem, 3.5vw, 3rem);
	align-items: start;
}

.document-card,
.empty-parchment {
	position: relative;
	overflow: hidden;
	border: 1px solid rgba(78, 54, 35, .55);
	background:
		radial-gradient(circle at 10% 10%, rgba(255, 255, 255, .2), transparent 20%),
		repeating-linear-gradient(4deg, rgba(70, 47, 27, .025) 0 1px, transparent 1px 5px),
		linear-gradient(130deg, var(--parchment-light), var(--parchment) 55%, #d3bb8d);
	color: var(--ink);
	box-shadow: var(--shadow), inset 0 0 80px rgba(93, 61, 32, .12);
	transform: rotate(-.18deg);
	transition: transform .25s ease, box-shadow .25s ease;
}

.document-card:nth-child(even) {
	transform: rotate(.18deg) translateY(1.5rem);
}

.document-card:hover {
	box-shadow: 0 30px 85px rgba(0, 0, 0, .5);
	transform: rotate(0) translateY(-4px);
}

.document-card::after,
.empty-parchment::after,
.sealed-document::after,
.lore-page::after {
	position: absolute;
	inset: 9px;
	pointer-events: none;
	content: "";
	border: 1px solid rgba(82, 57, 32, .2);
}

.document-card__image {
	display: block;
	height: 240px;
	overflow: hidden;
	filter: sepia(.35) contrast(.92) brightness(.86);
}

.document-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.document-card:hover .document-card__image img {
	transform: scale(1.035);
}

.document-card__body {
	position: relative;
	padding: clamp(1.8rem, 4vw, 3rem);
}

.document-card__meta {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
	color: #785736;
	font-family: var(--serif-display);
	font-size: .64rem;
	letter-spacing: .15em;
	text-transform: uppercase;
}

.document-card h3 {
	margin: 0 0 1rem;
	font-size: clamp(1.5rem, 3vw, 2.15rem);
	letter-spacing: .025em;
}

.document-card h3 a {
	color: var(--ink);
	text-decoration: none;
}

.document-card__excerpt {
	font-size: 1.02rem;
}

.document-card__excerpt p {
	margin: 0;
}

.document-card__link {
	display: inline-block;
	margin-top: 1.3rem;
	color: #67452d;
	font-family: var(--serif-display);
	font-size: .68rem;
	letter-spacing: .11em;
	text-decoration: none;
	text-transform: uppercase;
}

.empty-parchment {
	max-width: 720px;
	padding: 3rem;
	margin: 0 auto;
	text-align: center;
}

.empty-parchment .eyebrow {
	color: #7d5c34;
}

.search-form {
	display: flex;
	justify-content: center;
	gap: .6rem;
	margin-top: 1.5rem;
}

.search-field {
	min-width: min(100%, 320px);
	padding: .65rem .8rem;
	border: 1px solid rgba(84, 57, 34, .45);
	background: rgba(255, 255, 255, .18);
	color: var(--ink);
}

.search-submit {
	padding: .65rem 1rem;
	border: 1px solid #68492f;
	background: #68492f;
	color: var(--parchment-light);
	cursor: pointer;
}

.document-stage,
.page-stage {
	padding-block: clamp(4rem, 9vw, 8rem);
}

.sealed-document,
.lore-page {
	position: relative;
	padding: clamp(2rem, 7vw, 6rem);
	background:
		radial-gradient(circle at 85% 14%, rgba(255, 255, 255, .28), transparent 18rem),
		repeating-linear-gradient(3deg, rgba(80, 53, 25, .025) 0 1px, transparent 1px 6px),
		linear-gradient(130deg, var(--parchment-light), var(--parchment) 58%, #cdb381);
	color: var(--ink);
	box-shadow: var(--shadow), inset 0 0 130px rgba(70, 44, 22, .15);
}

.sealed-document__header,
.lore-page__header {
	position: relative;
	padding-bottom: 2.4rem;
	margin-bottom: 2.7rem;
	text-align: center;
}

.sealed-document__header::after,
.lore-page__header::after {
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 150px;
	height: 1px;
	content: "";
	background: linear-gradient(90deg, transparent, #85663d, transparent);
	transform: translateX(-50%);
}

.sealed-document__header h1,
.lore-page__header h1 {
	margin: 0;
	font-size: clamp(2.15rem, 6vw, 4rem);
	letter-spacing: .035em;
}

.sealed-document .document-kind,
.lore-page .eyebrow {
	color: #76552f;
}

.document-date {
	margin: .8rem 0 0;
	color: #785d3e;
	font-size: .85rem;
	font-style: italic;
}

.sealed-document__image {
	margin: 0 0 3rem;
	border: 1px solid rgba(75, 48, 27, .35);
	filter: sepia(.3) saturate(.8) contrast(.93);
}

.entry-content {
	font-size: clamp(1.08rem, 2.3vw, 1.25rem);
}

.entry-content > * {
	max-width: 720px;
	margin-right: auto;
	margin-left: auto;
}

.entry-content > .alignwide {
	max-width: 960px;
}

.entry-content > .alignfull {
	max-width: none;
	margin-right: calc(50% - 50vw);
	margin-left: calc(50% - 50vw);
}

.entry-content p {
	margin-block: 0 1.45em;
}

.sealed-document__content > p:first-child::first-letter,
.lore-page__content > p:first-child::first-letter {
	float: left;
	margin: .08em .12em 0 0;
	color: #4b2f27;
	font-family: var(--serif-display);
	font-size: 4.25em;
	line-height: .75;
}

.entry-content blockquote {
	padding: .6rem 0 .6rem 1.7rem;
	border-left: 2px solid #8d6b3b;
	color: #503c31;
	font-style: italic;
}

.entry-content h2 {
	margin-top: 2.2em;
	font-size: clamp(1.6rem, 4vw, 2.3rem);
}

.entry-content h3 {
	margin-top: 1.8em;
}

.sealed-document__footer {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 2rem;
	min-height: 200px;
	padding-top: 2rem;
	border-top: 1px solid rgba(82, 55, 32, .22);
}

.document-taxonomy {
	font-size: .78rem;
}

.document-taxonomy a {
	color: #65442d;
}

.wax-seal {
	position: relative;
	flex: 0 0 170px;
	margin: 0 -1.5rem -1.8rem 0;
	text-align: center;
	transform: rotate(-5deg);
}

.wax-seal img {
	width: 170px;
	aspect-ratio: 1;
	object-fit: cover;
	clip-path: circle(47% at 50% 50%);
	filter: saturate(.82) contrast(1.07) drop-shadow(0 9px 7px rgba(43, 23, 35, .28));
	mix-blend-mode: multiply;
}

.wax-seal figcaption {
	margin-top: -.5rem;
	color: #65465f;
	font-family: var(--serif-display);
	font-size: .55rem;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.post-navigation {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2rem;
	padding-top: 2.5rem;
}

.comments-area {
	padding: 2.5rem 0 0;
}

.comments-title,
.comment-reply-title {
	font-size: 1.45rem;
}

.comment-list {
	padding: 0;
	list-style: none;
}

.comment-list .comment-body {
	padding: 1.5rem;
	margin-bottom: 1rem;
	border: 1px solid rgba(189, 160, 94, .2);
	background: rgba(255, 255, 255, .025);
}

.comment-form label {
	display: block;
	color: var(--ash);
}

.comment-form input:not([type="submit"]),
.comment-form textarea {
	width: 100%;
	padding: .7rem;
	border: 1px solid rgba(189, 160, 94, .28);
	background: rgba(255, 255, 255, .05);
	color: var(--white);
}

.comment-form .submit {
	padding: .7rem 1rem;
	border: 1px solid var(--gold);
	background: transparent;
	color: var(--gold-bright);
	cursor: pointer;
}

.post-navigation > div:last-child {
	text-align: right;
}

.post-navigation a {
	color: var(--white);
	text-decoration: none;
}

.post-navigation span {
	display: block;
	margin-bottom: .3rem;
	color: var(--gold);
	font-family: var(--serif-display);
	font-size: .62rem;
	letter-spacing: .13em;
	text-transform: uppercase;
}

.lore-page__header .title-sigil {
	width: 68px;
	margin: 1.8rem auto 0;
	filter: sepia(.3) saturate(.8) brightness(.72);
}

.page-intro {
	color: #4f3b31;
	font-size: 1.25em;
	font-style: italic;
}

.principle-grid,
.pantheon-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.1rem;
	max-width: 100% !important;
	margin-block: 2.2rem 3.5rem;
}

.principle-grid section,
.pantheon-grid article {
	padding: 1.4rem;
	border: 1px solid rgba(74, 49, 29, .28);
	background: rgba(255, 251, 235, .18);
}

.principle-grid h3,
.pantheon-grid h3 {
	margin: 0 0 .7rem;
}

.principle-grid p,
.pantheon-grid p {
	margin-bottom: 0;
}

.pantheon-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pantheon-grid article {
	position: relative;
	padding: 1.7rem;
}

.pantheon-grid article::before {
	position: absolute;
	top: 8px;
	right: 8px;
	bottom: 8px;
	left: 8px;
	pointer-events: none;
	content: "";
	border: 1px solid rgba(80, 55, 32, .12);
}

.pantheon-grid strong {
	color: #674930;
	font-style: italic;
	font-weight: 400;
}

.deity-symbol {
	float: right;
	margin-left: .8rem;
	color: #7f623c;
	font-size: 2.1rem;
	line-height: 1;
}

.pantheon-light article {
	background: rgba(227, 190, 95, .12);
}

.pantheon-dark article {
	background: rgba(69, 44, 70, .1);
}

.pantheon-twilight article {
	background: linear-gradient(135deg, rgba(232, 210, 155, .08), rgba(76, 54, 80, .1));
}

.wp-block-separator {
	margin-block: 4rem;
	border: 0;
	border-top: 1px solid rgba(88, 60, 36, .38);
}

.navigation.pagination {
	margin-top: 5rem;
	text-align: center;
}

.nav-links {
	display: flex;
	justify-content: center;
	gap: .6rem;
}

.page-numbers {
	display: grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	border: 1px solid rgba(189, 160, 94, .35);
	color: var(--gold-bright);
	text-decoration: none;
}

.page-numbers.current {
	background: var(--gold);
	color: var(--night);
}

.lost-page {
	display: grid;
	place-items: center;
	min-height: 66vh;
	padding-block: 6rem;
	text-align: center;
}

.lost-page h1 {
	margin: 0;
	font-size: clamp(2.4rem, 7vw, 5rem);
}

.lost-page p:not(.eyebrow) {
	max-width: 620px;
	color: var(--ash);
}

.site-footer {
	border-top: 1px solid rgba(189, 160, 94, .2);
	background: #09070c;
}

.site-footer__inner {
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 3rem;
	width: var(--wrap);
	min-height: 190px;
	margin: 0 auto;
	color: #9d92a3;
	font-size: .85rem;
}

.site-footer__title {
	margin: 0;
	color: var(--white);
	font-family: var(--serif-display);
	font-size: 1.2rem;
	letter-spacing: .14em;
}

.site-footer p {
	margin: .25rem 0;
}

.site-footer ul {
	display: flex;
	gap: 1.5rem;
	padding: 0;
	margin: 0;
	list-style: none;
}

.site-footer a {
	color: #aea2b5;
}

.site-footer__mark {
	width: 54px;
	aspect-ratio: 1;
	background: url("assets/images/mu-symbol.svg") center / contain no-repeat;
}

.site-footer__mark span {
	display: none;
}

@media (max-width: 900px) {
	.site-header__inner {
		min-height: 80px;
	}

	.menu-toggle {
		display: block;
	}

	.primary-navigation {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		display: none;
		padding: 1.4rem;
		border-top: 1px solid rgba(189, 160, 94, .2);
		background: rgba(11, 8, 14, .98);
	}

	.primary-navigation.is-open {
		display: block;
	}

	.primary-navigation ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.primary-navigation li + li {
		border-top: 1px solid rgba(189, 160, 94, .12);
	}

	.primary-navigation a {
		display: block;
		padding: .9rem;
	}

	.primary-navigation a::after {
		display: none;
	}

	.hero {
		min-height: 690px;
	}
}

@media (max-width: 720px) {
	:root {
		--wrap: min(100% - 1.5rem, 1120px);
	}

	body {
		font-size: 17px;
	}

	.site-brand__sigil {
		width: 40px;
	}

	.site-tagline {
		font-size: .67rem;
	}

	.document-grid,
	.principle-grid,
	.pantheon-grid,
	.post-navigation {
		grid-template-columns: 1fr;
	}

	.document-card:nth-child(even) {
		transform: rotate(.18deg);
	}

	.sealed-document,
	.lore-page {
		padding: 2.3rem 1.5rem;
	}

	.sealed-document__footer {
		align-items: center;
		flex-direction: column;
	}

	.wax-seal {
		align-self: flex-end;
		margin-right: -1rem;
	}

	.post-navigation > div:last-child {
		text-align: left;
	}

	.site-footer__inner {
		grid-template-columns: 1fr auto;
		padding-block: 2.5rem;
	}

	.site-footer ul {
		grid-column: 1 / -1;
		grid-row: 2;
		flex-wrap: wrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
