/*
Theme Name: Crimson Desert Field Guide V8
Theme URI: https://crimson-desert.xyz/
Author: Crimson Desert
Author URI: https://crimson-desert.xyz/
Description: A dark crimson English editorial WordPress theme for Crimson Desert guides, news, walkthroughs, boss strategy, quests, and builds.
Version: 1.0.7
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: crimson-desert-field-guide
Tags: blog, news, custom-menu, featured-images, theme-options, wide-blocks
*/

:root {
	--cdfg-bg: #0e0f10;
	--cdfg-bg-deep: #070707;
	--cdfg-panel: #171515;
	--cdfg-panel-2: #211b19;
	--cdfg-text: #f5eee6;
	--cdfg-muted: #b8aaa0;
	--cdfg-soft: #7e746d;
	--cdfg-line: rgba(245, 238, 230, 0.14);
	--cdfg-red: #b63b30;
	--cdfg-red-bright: #e15542;
	--cdfg-gold: #d4a650;
	--cdfg-blue: #6f9aa6;
	--cdfg-radius: 8px;
	--cdfg-max: 1180px;
	--cdfg-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background:
		linear-gradient(rgba(245, 238, 230, 0.025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(245, 238, 230, 0.02) 1px, transparent 1px),
		radial-gradient(circle at 76% 12%, rgba(182, 59, 48, 0.2), transparent 28rem),
		radial-gradient(circle at 12% 42%, rgba(212, 166, 80, 0.12), transparent 24rem),
		linear-gradient(180deg, #111 0%, var(--cdfg-bg) 44%, var(--cdfg-bg-deep) 100%);
	background-size: 42px 42px, 42px 42px, auto, auto, auto;
	color: var(--cdfg-text);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.65;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	color: var(--cdfg-red-bright);
}

img {
	display: block;
	height: auto;
	max-width: 100%;
}

.screen-reader-text,
.skip-link {
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	overflow: hidden;
	position: absolute;
	width: 1px;
}

.skip-link:focus {
	clip: auto;
	background: var(--cdfg-red);
	color: #fff;
	height: auto;
	left: 1rem;
	padding: 0.75rem 1rem;
	top: 1rem;
	width: auto;
	z-index: 1000;
}

.site-header {
	backdrop-filter: blur(18px);
	background: rgba(10, 10, 10, 0.78);
	border-bottom: 1px solid var(--cdfg-line);
	position: sticky;
	top: 0;
	z-index: 50;
}

.header-inner {
	align-items: center;
	display: grid;
	gap: 1rem;
	grid-template-columns: auto 1fr auto;
	margin: 0 auto;
	max-width: var(--cdfg-max);
	min-height: 76px;
	padding: 0 1.25rem;
}

.site-branding {
	display: grid;
	gap: 0.1rem;
}

.brand-lockup {
	align-items: center;
	color: var(--cdfg-text);
	display: inline-flex;
	gap: 0.72rem;
	text-decoration: none;
}

.brand-mark {
	background: linear-gradient(145deg, rgba(244, 204, 113, 0.18), rgba(182, 59, 48, 0.16));
	border: 1px solid rgba(212, 166, 80, 0.38);
	border-radius: 8px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
	display: grid;
	height: 46px;
	place-items: center;
	width: 46px;
}

.brand-mark-svg {
	display: block;
	height: 38px;
	width: 38px;
}

.brand-copy {
	display: grid;
	gap: 0.08rem;
}

.site-title {
	color: var(--cdfg-text);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.1;
}

.brand-subtitle {
	color: var(--cdfg-gold);
	font-size: 0.68rem;
	font-weight: 900;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.site-description {
	color: var(--cdfg-muted);
	font-size: 0.78rem;
	line-height: 1.3;
}

.main-navigation {
	justify-self: end;
}

.menu {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem;
	justify-content: flex-end;
	list-style: none;
	margin: 0;
	padding: 0;
}

.menu li {
	position: relative;
}

.menu a {
	border-radius: 6px;
	color: var(--cdfg-muted);
	display: block;
	font-size: 0.82rem;
	font-weight: 700;
	padding: 0.65rem 0.72rem;
	text-transform: uppercase;
}

.menu a:hover,
.current-menu-item > a {
	background: rgba(225, 85, 66, 0.11);
	color: var(--cdfg-text);
}

.menu .sub-menu {
	background: rgba(9, 9, 9, 0.98);
	border: 1px solid var(--cdfg-line);
	border-radius: 8px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
	display: none;
	left: 0;
	list-style: none;
	margin: 0;
	min-width: 190px;
	padding: 0.35rem;
	position: absolute;
	top: 100%;
	z-index: 20;
}

.menu .sub-menu a {
	text-transform: none;
	white-space: nowrap;
}

.menu .menu-item-has-children:hover > .sub-menu,
.menu .menu-item-has-children:focus-within > .sub-menu,
.menu .menu-item-has-children.is-submenu-open > .sub-menu {
	display: block;
}

.nav-toggle,
.search-toggle,
.search-submit,
.button,
.wp-block-button__link {
	align-items: center;
	border: 1px solid rgba(245, 238, 230, 0.2);
	border-radius: 6px;
	cursor: pointer;
	display: inline-flex;
	font-size: 0.85rem;
	font-weight: 800;
	gap: 0.45rem;
	justify-content: center;
	line-height: 1;
	min-height: 42px;
	padding: 0.8rem 1rem;
	text-transform: uppercase;
	transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-toggle,
.search-toggle {
	background: transparent;
	color: var(--cdfg-text);
}

.nav-toggle {
	display: none;
}

.button,
.search-submit,
.wp-block-button__link {
	background: var(--cdfg-red);
	color: #fff;
}

.button:hover,
.search-submit:hover,
.wp-block-button__link:hover {
	background: var(--cdfg-red-bright);
	color: #fff;
	transform: translateY(-1px);
}

.button.secondary {
	background: transparent;
	color: var(--cdfg-text);
}

.site-search {
	background: rgba(7, 7, 7, 0.96);
	border-bottom: 1px solid var(--cdfg-line);
	display: none;
	padding: 1rem;
}

.site-search.is-open {
	display: block;
}

.search-form {
	display: flex;
	gap: 0.7rem;
	margin: 0 auto;
	max-width: 760px;
}

.search-field {
	background: #100f0f;
	border: 1px solid var(--cdfg-line);
	border-radius: 6px;
	color: var(--cdfg-text);
	flex: 1;
	font: inherit;
	min-height: 46px;
	padding: 0.75rem 0.9rem;
}

.site-main {
	min-height: 60vh;
}

.container {
	margin: 0 auto;
	max-width: var(--cdfg-max);
	padding: 0 1.25rem;
}

.hero {
	overflow: hidden;
	position: relative;
}

.hero::before {
	background:
		linear-gradient(110deg, rgba(7, 7, 7, 0.98) 0%, rgba(27, 13, 11, 0.86) 45%, rgba(7, 7, 7, 0.38) 100%),
		radial-gradient(circle at 76% 34%, rgba(225, 85, 66, 0.36), transparent 26rem),
		linear-gradient(135deg, rgba(212, 166, 80, 0.09), transparent 32%);
	content: "";
	inset: 0;
	opacity: 0.92;
	position: absolute;
}

.hero::after {
	background-image:
		linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
	background-size: 54px 54px;
	content: "";
	inset: 0;
	mask-image: linear-gradient(180deg, #000, transparent 82%);
	opacity: 0.5;
	position: absolute;
}

.hero-inner {
	display: grid;
	gap: 2.3rem;
	grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.72fr);
	min-height: 620px;
	padding-bottom: 5rem;
	padding-top: 5.4rem;
	position: relative;
	z-index: 2;
}

.hero-title {
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(3rem, 8vw, 6.6rem);
	letter-spacing: 0;
	line-height: 0.94;
	margin: 0;
	max-width: 820px;
}

.hero-subtitle {
	color: var(--cdfg-muted);
	font-size: 1.16rem;
	line-height: 1.75;
	margin: 1.4rem 0 0;
	max-width: 680px;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	margin-top: 2rem;
}

.hero-notice {
	border-left: 3px solid var(--cdfg-gold);
	color: #decfc4;
	margin-top: 2rem;
	max-width: 620px;
	padding-left: 1rem;
}

.hero-art-card {
	align-items: center;
	background: rgba(12, 11, 12, 0.68);
	border: 1px solid rgba(212, 166, 80, 0.28);
	border-radius: var(--cdfg-radius);
	box-shadow: var(--cdfg-shadow);
	display: grid;
	gap: 1rem;
	grid-template-columns: 112px minmax(0, 1fr);
	margin-top: 2rem;
	max-width: 560px;
	padding: 0.8rem;
}

.field-poster-mini {
	aspect-ratio: 4 / 5;
	background:
		radial-gradient(circle at 62% 28%, rgba(255, 230, 163, 0.68), transparent 28%),
		linear-gradient(155deg, rgba(21, 14, 13, 0.16), rgba(8, 7, 8, 0.74)),
		linear-gradient(135deg, #7f241f 0%, #d08a42 52%, #111015 100%);
	border: 1px solid rgba(244, 204, 113, 0.42);
	border-radius: 6px;
	box-shadow: inset 0 0 0 4px rgba(8, 8, 8, 0.24);
	display: grid;
	padding: 0.7rem;
	place-content: end start;
	width: 112px;
}

.field-poster-title {
	color: var(--cdfg-text);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1rem;
	font-weight: 700;
	line-height: 0.96;
	text-transform: uppercase;
}

.field-poster-line {
	color: var(--cdfg-gold);
	font-size: 0.56rem;
	font-weight: 900;
	letter-spacing: 0.18em;
	margin-top: 0.3rem;
	text-transform: uppercase;
}

.hero-art-caption {
	display: grid;
	gap: 0.22rem;
}

.hero-art-caption span {
	color: var(--cdfg-gold);
	font-size: 0.72rem;
	font-weight: 900;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.hero-art-caption strong {
	color: var(--cdfg-text);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.18rem;
	line-height: 1.25;
}

.hero-panel {
	align-self: end;
	background: linear-gradient(180deg, rgba(33, 27, 25, 0.92), rgba(14, 15, 16, 0.94));
	border: 1px solid var(--cdfg-line);
	border-radius: var(--cdfg-radius);
	box-shadow: var(--cdfg-shadow);
	overflow: hidden;
}

.hero-panel-header {
	align-items: center;
	border-bottom: 1px solid var(--cdfg-line);
	color: var(--cdfg-muted);
	display: flex;
	font-size: 0.8rem;
	font-weight: 800;
	justify-content: space-between;
	padding: 0.9rem 1rem;
	text-transform: uppercase;
}

.hero-feature-list {
	display: grid;
}

.hero-feature {
	display: grid;
	gap: 0.9rem;
	grid-template-columns: 96px 1fr;
	padding: 1rem;
}

.hero-feature + .hero-feature {
	border-top: 1px solid var(--cdfg-line);
}

.thumb {
	aspect-ratio: 1.32 / 1;
	background:
		linear-gradient(135deg, rgba(182, 59, 48, 0.42), rgba(111, 154, 166, 0.16)),
		#161313;
	border-radius: 6px;
	overflow: hidden;
}

.thumb-placeholder {
	background:
		radial-gradient(circle at 72% 22%, rgba(245, 196, 105, 0.68), transparent 22%),
		linear-gradient(160deg, rgba(16, 12, 12, 0.12), rgba(7, 7, 8, 0.84)),
		linear-gradient(135deg, #381513 0%, #b63b30 48%, #141010 100%);
	display: block;
	height: 100%;
	min-height: 100%;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.placeholder-ridge {
	background: linear-gradient(135deg, transparent 0 34%, rgba(8, 8, 9, 0.76) 35% 64%, transparent 65%);
	bottom: 0;
	height: 58%;
	left: -8%;
	position: absolute;
	right: -8%;
}

.placeholder-sun {
	background: rgba(244, 204, 113, 0.78);
	border-radius: 999px;
	height: 42px;
	position: absolute;
	right: 14%;
	top: 16%;
	width: 42px;
}

.placeholder-title {
	bottom: 0.75rem;
	color: var(--cdfg-text);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1rem;
	font-weight: 700;
	left: 0.8rem;
	line-height: 1;
	position: absolute;
	right: 0.8rem;
	text-transform: uppercase;
	z-index: 2;
}

.hero-feature h3,
.post-card h3 {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.05rem;
	letter-spacing: 0;
	line-height: 1.25;
	margin: 0.25rem 0 0;
}

.entry-meta {
	color: var(--cdfg-gold);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.72rem;
	font-weight: 800;
	gap: 0.55rem;
	text-transform: uppercase;
}

.section {
	padding: 4.4rem 0;
}

.section.compact {
	padding-top: 2.6rem;
}

.visual-atlas {
	background:
		linear-gradient(180deg, rgba(14, 15, 16, 0), rgba(33, 20, 16, 0.62) 42%, rgba(14, 15, 16, 0)),
		radial-gradient(circle at 20% 20%, rgba(212, 166, 80, 0.12), transparent 22rem);
}

.section-header {
	align-items: end;
	border-bottom: 1px solid var(--cdfg-line);
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin-bottom: 1.4rem;
	padding-bottom: 1rem;
}

.section-title {
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.8rem, 3vw, 2.7rem);
	letter-spacing: 0;
	line-height: 1.08;
	margin: 0;
}

.section-link {
	color: var(--cdfg-muted);
	font-size: 0.82rem;
	font-weight: 800;
	text-transform: uppercase;
}

.grid {
	display: grid;
	gap: 1.1rem;
}

.grid.three {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.poster-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: 1.25fr 0.9fr 0.9fr;
}

.poster-card {
	background: #111;
	border: 1px solid rgba(212, 166, 80, 0.24);
	border-radius: var(--cdfg-radius);
	box-shadow: var(--cdfg-shadow);
	min-height: 340px;
	overflow: hidden;
	position: relative;
}

.poster-card:first-child {
	min-height: 430px;
}

.poster-card img,
.poster-card .thumb-placeholder {
	display: block;
	height: 100%;
	width: 100%;
}

.poster-card img {
	object-fit: cover;
	transform: scale(1.01);
	transition: transform 180ms ease;
}

.poster-card:hover img {
	transform: scale(1.04);
}

.poster-card::after {
	background: linear-gradient(180deg, transparent 35%, rgba(8, 8, 8, 0.88));
	content: "";
	inset: 0;
	position: absolute;
}

.poster-card span,
.poster-card h3 {
	left: 1rem;
	position: absolute;
	right: 1rem;
	z-index: 2;
}

.poster-card span {
	bottom: 4.4rem;
	color: var(--cdfg-gold);
	font-size: 0.72rem;
	font-weight: 900;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.poster-card h3 {
	bottom: 1rem;
	color: var(--cdfg-text);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.26rem;
	line-height: 1.18;
	margin: 0;
}

.post-card {
	background: linear-gradient(180deg, rgba(33, 27, 25, 0.82), rgba(18, 17, 17, 0.88));
	border: 1px solid var(--cdfg-line);
	border-radius: var(--cdfg-radius);
	min-width: 0;
	overflow: hidden;
	transition: border-color 160ms ease, transform 160ms ease;
}

.post-card:hover {
	border-color: rgba(225, 85, 66, 0.46);
	transform: translateY(-2px);
}

.post-card-body {
	padding: 1rem;
}

.post-card .thumb {
	border-radius: 0;
}

.post-card-compact {
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr);
}

.post-card-compact .thumb {
	aspect-ratio: 1.15 / 1;
}

.post-card-compact .post-card-body {
	align-content: center;
	display: grid;
	padding: 0.85rem;
}

.post-card-compact .entry-meta,
.post-card-compact p {
	display: none;
}

.post-card p {
	color: var(--cdfg-muted);
	margin: 0.75rem 0 0;
}

.category-rail {
	display: grid;
	gap: 0.8rem;
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

.category-tile {
	background:
		linear-gradient(135deg, rgba(182, 59, 48, 0.18), rgba(111, 154, 166, 0.07)),
		var(--cdfg-panel);
	border: 1px solid var(--cdfg-line);
	border-radius: var(--cdfg-radius);
	padding: 1.1rem;
}

.category-tile span {
	color: var(--cdfg-gold);
	display: block;
	font-size: 0.72rem;
	font-weight: 900;
	margin-bottom: 0.45rem;
	text-transform: uppercase;
}

.category-tile strong {
	display: block;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.3rem;
	line-height: 1.1;
}

.archive-hero {
	border-bottom: 1px solid var(--cdfg-line);
	padding: 4.2rem 0 2.6rem;
}

.archive-hero h1,
.entry-header h1,
.page-header h1 {
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(2.4rem, 5vw, 4.8rem);
	letter-spacing: 0;
	line-height: 1;
	margin: 0;
}

.archive-description,
.page-subtitle {
	color: var(--cdfg-muted);
	max-width: 720px;
}

.content-layout {
	display: grid;
	gap: 2rem;
	grid-template-columns: minmax(0, 1fr) 310px;
}

.entry-shell {
	padding: 4rem 0;
}

.entry-header {
	margin-bottom: 1.6rem;
}

.featured-image {
	border: 1px solid var(--cdfg-line);
	border-radius: var(--cdfg-radius);
	margin: 1.8rem 0;
	overflow: hidden;
}

.entry-content {
	color: #e7ded6;
	font-size: 1.06rem;
}

.entry-content a {
	color: var(--cdfg-gold);
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	color: var(--cdfg-text);
	font-family: Georgia, "Times New Roman", serif;
	letter-spacing: 0;
	line-height: 1.16;
	margin: 2rem 0 0.8rem;
}

.entry-content blockquote {
	border-left: 3px solid var(--cdfg-red);
	color: #d7c8bc;
	margin-left: 0;
	padding-left: 1rem;
}

.entry-footer,
.post-navigation,
.pagination,
.not-found {
	border-top: 1px solid var(--cdfg-line);
	margin-top: 2rem;
	padding-top: 1.4rem;
}

.pagination .nav-links,
.post-navigation .nav-links {
	display: flex;
	gap: 1rem;
	justify-content: space-between;
}

.widget {
	background: rgba(33, 27, 25, 0.72);
	border: 1px solid var(--cdfg-line);
	border-radius: var(--cdfg-radius);
	margin-bottom: 1rem;
	padding: 1rem;
}

.widget-title {
	font-size: 1rem;
	margin-top: 0;
}

.site-footer {
	background: #080808;
	border-top: 1px solid var(--cdfg-line);
	color: var(--cdfg-muted);
	padding: 2rem 0;
}

.footer-inner {
	align-items: flex-start;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
}

.footer-note {
	margin: 0;
	max-width: 34rem;
	text-align: right;
}

.footer-navigation {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.footer-legal {
	align-items: flex-start;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.footer-legal-title {
	color: var(--cdfg-text);
	font-weight: 700;
	text-decoration: none;
}

.footer-navigation a {
	color: var(--cdfg-muted);
	text-decoration: none;
}

.footer-legal-title:hover,
.footer-legal-title:focus,
.footer-navigation a:hover,
.footer-navigation a:focus {
	color: var(--cdfg-text);
}

@media (max-width: 980px) {
	.header-inner {
		grid-template-columns: 1fr auto auto;
	}

	.nav-toggle {
		display: inline-flex;
	}

	.main-navigation {
		background: rgba(9, 9, 9, 0.98);
		border-top: 1px solid var(--cdfg-line);
		display: none;
		grid-column: 1 / -1;
		justify-self: stretch;
		padding: 0.6rem 0;
	}

	.main-navigation.is-open {
		display: block;
	}

	.menu {
		align-items: stretch;
		display: grid;
		gap: 0;
	}

	.menu .sub-menu {
		border: 0;
		box-shadow: none;
		display: none;
		margin-left: 1rem;
		min-width: 0;
		position: static;
	}

	.hero-inner,
	.content-layout,
	.poster-grid,
	.grid.three,
	.grid.two {
		grid-template-columns: 1fr;
	}

	.category-rail {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.header-inner {
		min-height: 68px;
		padding: 0 1rem;
	}

	.site-description {
		display: none;
	}

	.hero-inner {
		min-height: auto;
		padding-bottom: 3rem;
		padding-top: 3.2rem;
	}

	.hero-feature {
		grid-template-columns: 78px 1fr;
	}

	.hero-art-card {
		grid-template-columns: 86px minmax(0, 1fr);
	}

	.field-poster-mini {
		width: 86px;
	}

	.section {
		padding: 3rem 0;
	}

	.section-header,
	.footer-inner,
	.search-form {
		align-items: stretch;
		flex-direction: column;
	}

	.footer-note {
		text-align: left;
	}

	.category-rail {
		grid-template-columns: 1fr;
	}

	.post-card-compact {
		grid-template-columns: 92px minmax(0, 1fr);
	}
}
