/*
 * Site makeover: loaded after all theme and plugin styles.
 * Moody-but-readable palette: dark peat/heather surround, warm parchment page.
 */

:root {
	--bg: #22212a;          /* page surround */
	--bg-deep: #17161c;     /* header / footer */
	--paper: #f6f1e7;       /* content background */
	--card: #fffdf8;        /* book cards */
	--ink: #2b2723;         /* body text */
	--ink-soft: #5c554d;    /* secondary text */
	--line: #e0d7c6;        /* borders */
	--accent: #8c2f3f;      /* deep claret */
	--accent-dark: #6a1f2d;
	--on-dark: #ece6da;     /* text on dark areas */
	--on-dark-soft: #b3aa9c;
	--serif: 'Cormorant Garamond', Georgia, serif;
	--body: 'Lora', Georgia, serif;
}

/* ---------- Page surround & width ---------- */

body,
body.custom-background {
	background: var(--bg) radial-gradient(ellipse at top, #34313f 0%, var(--bg) 60%) fixed;
	color: var(--ink);
	font-family: var(--body);
}

#page {
	max-width: 1240px;
	margin: 0 auto;
	background: var(--paper);
	box-shadow: 0 0 60px rgba(0, 0, 0, 0.45);
}

.inner-wrap {
	max-width: 1140px;
}

/* ---------- Typography ---------- */

body, button, input, select, textarea,
#content p, .entry-content, .entry-content p, .entry-content li {
	font-family: var(--body);
	font-size: 17px;
	line-height: 1.75;
	color: var(--ink);
}

/* Override the tiny inline font sizes left by the old editor */
.entry-content span[style*="font-size"] {
	font-size: inherit !important;
}

h1, h2, h3, h4, h5, h6,
.widget-title, .header-post-title-class, #site-title {
	font-family: var(--serif);
	color: var(--ink);
	font-weight: 600;
	letter-spacing: 0.01em;
}

.entry-content h2 { font-size: 34px; }
.entry-content h3 { font-size: 28px; }
.entry-content h4 { font-size: 24px; }

a,
#content a,
.entry-content a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-color: rgba(140, 47, 63, 0.35);
	text-underline-offset: 3px;
	transition: color 0.15s, text-decoration-color 0.15s;
}

a:hover,
#content a:hover,
.entry-content a:hover {
	color: var(--accent-dark);
	text-decoration-color: currentColor;
}

blockquote {
	border-left: 3px solid var(--accent);
	font-family: var(--serif);
	font-size: 22px;
	font-style: italic;
}

::selection { background: var(--accent); color: #fff; }

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

#masthead,
#header-text-nav-container {
	background: var(--bg-deep);
	border-bottom: 0;
}

#header-text-nav-wrap {
	padding: 28px 0;
}

#site-title {
	font-size: 44px;
	line-height: 1.1;
	padding: 0;
}

#site-title a,
#site-title a:hover {
	color: var(--on-dark);
	text-decoration: none;
	font-family: var(--serif);
}

#site-description {
	color: var(--on-dark-soft);
	font-family: var(--body);
	font-style: italic;
	font-size: 15px;
	letter-spacing: 0.08em;
}

.main-navigation a,
.main-navigation ul li a {
	color: var(--on-dark);
	font-family: var(--body);
	font-size: 15px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
}

.main-navigation ul li:hover > a,
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current_page_item > a,
.main-navigation a:hover {
	color: #d9a0a9;
}

.main-navigation ul li.current-menu-item,
.main-navigation ul li.current_page_item {
	border-bottom: 2px solid var(--accent);
}

/* Mobile menu toggle */
.site-header .menu-toggle,
.site-header .menu-toggle:hover {
	background: transparent;
	color: var(--on-dark);
	border: 1px solid rgba(236, 230, 218, 0.3);
	border-radius: 4px;
}

/* On small screens the theme's JS swaps .main-navigation for .main-small-navigation */
.main-small-navigation li,
.main-small-navigation ul > .current_page_item,
.main-small-navigation ul > .current-menu-item {
	background: var(--bg-deep);
	border-bottom: 1px solid rgba(236, 230, 218, 0.08);
}

.main-small-navigation li:hover {
	background: #2e2b38;
}

.main-small-navigation a {
	color: var(--on-dark);
	font-family: var(--body);
	text-decoration: none;
}

.main-small-navigation ul > .current_page_item > a,
.main-small-navigation ul > .current-menu-item > a {
	color: #d9a0a9;
	border-left: 3px solid var(--accent);
}

@media (max-width: 768px) {
	#site-title { font-size: 36px; }
}

/* Page title bar on inner pages */
.header-post-title-container {
	background: #ece5d6;
	border-bottom: 1px solid var(--line);
}

.header-post-title-class {
	font-size: 30px;
}

.breadcrumb, .breadcrumb a {
	color: var(--ink-soft);
	font-size: 13px;
}

/* ---------- Main content ---------- */

#main {
	background: var(--paper);
	padding-top: 40px;
}

/* ---------- Home page ---------- */

/* Opening quote bar */
#pl-8 #panel-8-0-0-0 > .panel-widget-style {
	background: var(--bg) linear-gradient(135deg, #2e2b38, #1c1b22) !important;
	padding: 28px 24px 14px;
	border-radius: 4px;
}

#pl-8 #panel-8-0-0-0 p,
#pl-8 #panel-8-0-0-0 span {
	font-family: var(--serif);
	font-size: 26px !important;
	line-height: 1.4;
	color: var(--on-dark) !important;
}

#pl-8 #panel-8-0-0-0 strong,
#pl-8 #panel-8-0-0-0 strong span {
	font-family: var(--body);
	font-size: 14px !important;
	font-weight: 400;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--on-dark-soft) !important;
}

/* Hide the empty grey panel below the quote */
#pl-8 #panel-8-0-0-1 { display: none; }
#pl-8 #panel-8-0-0-0 { margin-bottom: 0; }

/* Book cards */
#pl-8 .so-panel > .panel-widget-style {
	background: var(--card);
	border: 1px solid var(--line) !important;
	border-radius: 6px;
	padding: 22px 22px 8px !important;
	box-shadow: 0 2px 10px rgba(43, 39, 35, 0.06);
	transition: transform 0.2s, box-shadow 0.2s;
}

#pl-8 .so-panel > .panel-widget-style:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgba(43, 39, 35, 0.14);
}

#pl-8 .widget-title {
	font-size: 26px;
	line-height: 1.2;
	text-align: center;
	margin-bottom: 16px;
	padding: 0;
	border: 0;
}

#pl-8 .panel-grid-cell .textwidget h4 {
	font-size: 24px;
	text-align: center !important;
}

/* Covers: centred, same height, with a shadow */
#pl-8 #pg-8-1 .panel-grid-cell .so-panel:not(#panel-8-1-0-0) .textwidget img {
	float: none;
	display: block;
	margin: 0 auto 18px;
	height: 260px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
	border-radius: 2px;
}

#pl-8 .textwidget p[style*="text-align: center"],
#pl-8 .textwidget p[style*="text-align: left"] {
	text-align: left !important;
}

/* About-me column (first cell of the second row) */
#pl-8 #panel-8-1-0-0 img {
	border-radius: 6px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

#pl-8 #panel-8-1-0-0 h4 {
	font-size: 30px;
}

#pl-8 .panel-grid-cell .so-panel {
	margin-bottom: 30px;
}

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

#colophon,
.footer-socket-wrapper {
	background: var(--bg-deep);
	border-top: 0;
}

.footer-socket-wrapper .copyright,
.footer-socket-wrapper .copyright a,
.small-menu a {
	color: var(--on-dark-soft);
	font-family: var(--body);
	font-size: 14px;
	text-decoration: none;
}

.footer-socket-wrapper .copyright a:hover,
.small-menu a:hover,
.small-menu ul li.current-menu-item a {
	color: var(--on-dark);
}

a#scroll-up {
	background-color: var(--accent);
}

/* ---------- Buttons ---------- */

.spacious-button, input[type="reset"], input[type="button"], input[type="submit"], button {
	background-color: var(--accent);
}

/* ---------- Blog page ---------- */

.page-id-2 #content .entry-content {
	max-width: 760px;
	margin: 10px auto 20px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 36px 44px 28px;
	box-shadow: 0 2px 10px rgba(43, 39, 35, 0.06);
}

.page-id-2 #content .entry-content p:first-child::first-letter {
	font-family: var(--serif);
	font-size: 3.4em;
	float: left;
	line-height: 0.9;
	margin: 6px 10px 0 0;
	color: var(--accent);
}

.page-id-2 .entry-meta-bar {
	display: none;
}

.blog-cta {
	text-align: center;
	margin-top: 28px;
}

#content a.blog-button {
	display: inline-block;
	background: var(--accent);
	color: #fff;
	font-family: var(--body);
	font-size: 15px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 12px 30px;
	border-radius: 4px;
	transition: background 0.15s;
}

#content a.blog-button:hover {
	background: var(--accent-dark);
	color: #fff;
}

@media (max-width: 600px) {
	.page-id-2 #content .entry-content {
		padding: 24px 20px 20px;
	}
}
