/**
 * Modern Theme Mode — Barebones Foundation
 * Base styles (CSS variables defined dynamically in header)
 */

/* Load Google Fonts for Modern Mode */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Inter:wght@200;300;400;500;600;700&display=swap');

/* Base body styles for modern mode */
html.lwp-theme-mode-modern,
body.lwp-theme-mode-modern {
	background-color: var(--lwp-bg-primary) !important;
	color: var(--lwp-text-primary);
}

body.lwp-theme-mode-modern {
	font-family: var(--lwp-font-sans);
	background-color: var(--lwp-bg-primary) !important;
	color: var(--lwp-text-primary);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	margin: 0;
	padding: 0;
}

/* Ensure wrapper uses palette background */
.lwp-modern-wrapper {
	background-color: var(--lwp-bg-primary);
	min-height: 100vh;
}

/* Main content area */
.lwp-modern-main {
	background-color: var(--lwp-bg-primary);
	color: var(--lwp-text-primary);
}

/* Footer */
.lwp-modern-footer {
	background-color: var(--lwp-bg-secondary);
	color: var(--lwp-text-secondary);
	border-top: 1px solid var(--lwp-border);
}

/*
 * Section background alternation (modern mode only).
 *
 * Every modern block renders its content inside a <section> that is a direct
 * child of the page content wrapper, so nth-of-type counts the block sections
 * in document order. Even-positioned sections step up to --lwp-bg-secondary to
 * create a subtle rhythm between sections; odd sections keep the block's own
 * --lwp-bg-primary (or inherit it from the body). The hero is intentionally
 * absent from the list — it carries its own background layers and must keep
 * them. The rule is scoped to the seven block classes so the work/series
 * template sections (lwp-mw-*, lwp-ms-*) are never touched.
 *
 * Specificity is (0,3,1), which beats each block's own (0,1,0) primary
 * declaration regardless of load order, so no per-block CSS edits are needed.
 *
 * To escalate the contrast, swap --lwp-bg-secondary for --lwp-bg-tertiary.
 */
.lwp-modern-main section.lwp-abm:nth-of-type(even),
.lwp-modern-main section.lwp-bcm:nth-of-type(even),
.lwp-modern-main section.lwp-ctm:nth-of-type(even),
.lwp-modern-main section.lwp-evn:nth-of-type(even),
.lwp-modern-main section.lwp-jrn:nth-of-type(even),
.lwp-modern-main section.lwp-wnm:nth-of-type(even),
.lwp-modern-main section.lwp-wsm:nth-of-type(even) {
	background-color: var(--lwp-bg-secondary, #0f1420);
}
