﻿:root {
	/* Pervita Color Palette */
	/* Default to Light Mode / No Preference */
	--bg-deep-rift: #FFFFFF; /* Main background becomes white */
	--bg-deep-rift-dark: #080B11; /* Main background becomes white */
	--bg-surface: rgb(28 34 60); /* Lighter surface for cards/nav (remains dark) */
	--bg-surface-fade: rgba(18, 24, 38, 0.65);
	--bg-nav: rgba(18, 24, 38, 0.95);
	--border-gentle: rgba(0, 0, 0, 0.2);
	--accent-sand: #D4AF37;
	--accent-sand-hover: #F6D569;
	--accent-cerelith: #528aa2;
	--accent-cerelith-hover: #6cbadc;
	--accent-mirius: #2E5339; /* Forest green */
	/*--text-hero-highlight: rgb(28 34 60);*/
	--text-hero-highlight: var(--accent-sand-hover);
	/* Typography - Adaptive (Changes based on theme) */
	--text-main: #1A202C; /* Dark text for light background */
	--text-main-light: #E2E8F0; /* Dark text for light background */
	--text-blue: #94A3B8;
	--text-blue-light: #94A3B8;
	--text-title: #14316a;
	--text-title-light: #94A3B8;
	--text-hero: black;
	/* Typography - Fixed for Dark Panels */
	--text-panel-main: #E2E8F0;
	--font-heading: 'Cinzel', serif;
	--font-body: 'Inter', sans-serif;
	/* Layout */
	--max-width: 1200px;
	--transition-speed: 0.3s;
	--field-padding: 0.6rem 1rem;
}

/* Dark Mode Override - system */
@media (prefers-color-scheme: dark) {
	:root {
		--bg-deep-rift: var(--bg-deep-rift-dark); /* Reverts to darkest blue/black */
		--text-main: var(--text-main-light); /* Reverts to light text */
		--text-title: var(--text-title-light);
		--text-blue: var(--text-blue-light);
		--bg-surface: rgb(18, 24, 38);
		--border-gentle: rgba(255, 255, 255, 0.2);
		--text-hero: white;
		--text-hero-highlight: var(--accent-sand);
	}
}

/* Dark Mode Override - forced */
:root[data-theme="dark"], body.force-dark {
	--bg-deep-rift: var(--bg-deep-rift-dark);
	--text-main: var(--text-main-light);
	--text-title: var(--text-title-light);
	--text-blue: var(--text-blue-light); /* Reverts to light text */
	--bg-surface: rgb(18, 24, 38);
	--border-gentle: rgba(255, 255, 255, 0.2);
	--text-hero: white;
	--text-hero-highlight: var(--accent-sand);
}


/* Base Styles */
* {
	accent-color: var(--accent-sand);
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

::selection {
	color: black;
	background: var(--accent-sand-hover);
}

body {
	background-color: var(--bg-deep-rift);
	color: var(--text-main);
	font-family: var(--font-body);
	line-height: 1.6;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
	transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.section {
	margin-bottom: 1em;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	font-weight: 600;
	letter-spacing: 0.05em;
}

h2, h3 {
	font-family: verdana;
	font-weight: normal;
	letter-spacing: 0;
}

.title {
	color: var(--heading-color);
	margin-bottom: 0.5rem;
	font-size: clamp(2.5rem, 5vw, 4rem);
}

.subtitle {
	color: var(--accent-sand);
	color: var(--accent-cerelith);
	margin-bottom: 2rem;
	font-size: 1.2rem;
	font-style: italic;
}

.inline-icon {
	display: inline-block;
	vertical-align: middle;
	height: 1.2em;
	margin-right: 0.4em;
}

.text-danger {
	color: #dc3545;
}

.success-banner {
	background-color: #d4edda;
	color: #155724;
}

a, .highlight, .nav-links a.highlight {
	color: var(--accent-sand);
	text-decoration: none;
	transition: color var(--transition-speed) ease;
}

a:hover, .nav-links a.highlight:hover {
	color: var(--accent-sand-hover);
}

/* Navigation */

.site-header {
	background-color: var(--bg-surface);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(212, 175, 55, 0.1);
	top: 0;
	z-index: 1000;
}

.nav-container {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 1rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.brand-logo {
	font-family: var(--font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--accent-sand);
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.nav-links {
	display: flex;
	gap: 2rem;
	list-style: none;
}

.nav-links a {
	color: var(--text-panel-main); /* Fixed to light color */
	font-size: 0.9rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.nav-links a:hover {
	color: var(--accent-sand);
}
/* Main Content Area */
.main-content {
	flex: 1;
	margin: 0 auto;
	width: 100%;
}

.section, .about-grid {
	max-width: var(--max-width);
	padding: 3rem 2rem;
	margin: 0 auto;
}
/* Footer */
.site-footer {
	background-color: var(--bg-surface);
	border-top: 1px solid rgba(212, 175, 55, 0.1);
	padding: 3rem 2rem;
	margin-top: auto;
}

.footer-container {
	max-width: var(--max-width);
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 2rem;
}

.footer-section h4 {
	color: var(--accent-sand);
	margin-bottom: 1rem;
	font-size: 1.1rem;
}

.footer-section p {
	color: var(--text-blue-light);
	font-size: 0.9rem;
}

.footer-bottom {
	text-align: center;
	padding-top: 2rem;
	margin-top: 2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
	color: var(--text-blue-light);
	font-size: 0.85rem;
}

.hero-section {
	position: relative;
	min-height: 65vh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 2rem;
	padding-top: 4rem;
	margin-bottom: 2em;
	margin-top: 0; 
	/* Using a placeholder gradient fallback for the map.png */
	background-color: var(--bg-deep-rift);
	background-image: linear-gradient(rgba(0,0,0,0.5), var(--bg-deep-rift) 120%), url('../images/map.png'); /* Ensure map.png is in wwwroot/images */
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	transform: translateZ(0);
	will-change: transform;
	clip-path: inset(0 0 1px 0);
}

/* Dark Mode Override */
@media (prefers-color-scheme: dark) {

	.hero-section {
		background-image: radial-gradient(closest-side, rgba(8, 11, 17, 0.7), rgba(8, 11, 17, 0.7), rgba(8, 11, 17, 1)), url(../images/map.png);
		-webkit-mask-image: radial-gradient(circle, black 60%, transparent 100%);
		mask-image: radial-gradient(circle, black 5%, transparent 100%);
	}
}

.force-dark .hero-section {
	background-image: radial-gradient(closest-side, rgba(8, 11, 17, 0.7), rgba(8, 11, 17, 0.7), rgba(8, 11, 17, 1)), url(../images/map.png);
	-webkit-mask-image: radial-gradient(circle, black 60%, transparent 100%);
	mask-image: radial-gradient(circle, black 5%, transparent 100%);
}

.hero-content {
	position: relative;
	z-index: 2;
	max-width: 800px;
	animation: fadeIn 1.5s ease-out;
}

.hero-subtitle {
	font-family: var(--font-body);
	color: var(--accent-cerelith);
	color: var(--accent-cerelith);
	font-size: 1.1rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	margin-bottom: 1rem;
	font-weight: 600;
}

.hero-title {
	font-size: clamp(3rem, 4vw, 4rem);
	color: var(--text-hero);
	color: white;
	margin-bottom: 1.5rem;
	text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
	line-height: 1.1;
}

.hero-description {
	font-size: 1.2rem;
	color: var(--text-hero);
	opacity: 0.9;
	margin-bottom: 2.5rem;
	line-height: 1.8;
	text-wrap: balance;
}


.hero-quote {
	font-size: 1.1rem;
	color: var(--text-hero);
	margin-bottom: 2.5rem;
	line-height: 1.8;
	font-style: italic;
	text-wrap: balance;
	white-space: unset;
}

.hero-quote .highlight {
	color: var(--text-hero-highlight);
}

blockquote.hero-quote {
	color: #ffffff; /* Solid white for maximum contrast */
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 12px rgba(0, 0, 0, 0.6); /* Soft dark aura around letters */
	font-size: 1.25rem;
	line-height: 1.8;
	letter-spacing: 0.02em;
}

blockquote.hero-quote p, p.hero-quote {
	margin-bottom: 0.75rem;
}

blockquote.hero-quote > :first-child::before,
blockquote.hero-quote > :last-child::after,
p.hero-quote::before,
p.hero-quote::after {
	content: "“";
	color: var(--text-hero-highlight);
	font-size: 2em;
	font-family: "Times New Roman";
	font-weight: bold;
	vertical-align: middle;
	line-height: 0.8em;
}

blockquote.hero-quote > :last-child::after,
p.hero-quote::after {
	content: "”";
}

.quote-mark {
	color: var(--accent-sand);
	font-size: 2em;
	font-family: "Times New Roman";
	font-weight: bold;
	vertical-align: middle
}

/* Helper Classes for Razor Pages */

.about-header {
	text-align: center;
	padding: 4rem 2rem 2rem;
	/*	margin-bottom: 2rem;*/
}

.about-header h1 {
	font-size: clamp(2.5rem, 5vw, 4rem);
	color: var(--text-main);
	margin-bottom: 0.5rem;
}

.about-header p {
	color: var(--accent-cerelith);
	font-family: var(--font-heading);
	letter-spacing: 0.1em;
	font-weight: 600;
	text-transform: uppercase;
	font-size: 1rem;
}

.about-grid {
	display: grid;
	gap: 4rem;
	align-items: center;
	justify-items:center;
}

.about-grid.top {
	align-items: start;
}

.book-cover {
	display: flex;
	flex-direction: column;
	gap: 1em;
	border: 1px solid rgba(255,255,255,0.05);
	aspect-ratio: 2/3;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	box-shadow: -10px 10px 40px rgba(0,0,0,0.6);
	position: relative;
	overflow: hidden;
	padding: 1em;
}

.book-cover::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 100%);
	transform: skewX(-20deg) translateX(-150%);
	animation: shimmer 5s infinite;
}

.book-cover.placeholder {
	background: linear-gradient(135deg, var(--bg-surface), var(--bg-deep-rift-dark));
}

.cover-wrapper {
	width:90%;
}

.quick-facts h3 {
	font-size: 1.1rem;
	color: var(--accent-cerelith);
	margin-bottom: 1rem;
	border-bottom: 1px solid rgba(212, 175, 55, 0.2);
	padding-bottom: 0.5rem;
}

.quick-facts ul {
	list-style: none;
	margin-bottom: 2rem;
}

.quick-facts ul:last-child {
	list-style: none;
	margin-bottom: 1rem;
}

.quick-facts li {
	margin-bottom: 0.8rem;
	font-size: 0.9rem;
	color: var(--text-blue-light);
	display: flex;
	flex-direction: column;
}

.quick-facts li strong {
	color: var(--text-panel-main);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.2rem;
}
/* Main Biography Content */
.author-bio {
	font-size: 1.1rem;
	line-height: 1.8;
	opacity: 0.8;
}

.author-bio p {
	margin-bottom: 1.5rem;
}

.author-bio strong {
	color: var(--text-main);
	font-weight: 600;
}

.author-photo {
	width: 360px;
	max-width: 100%;
	object-fit: cover;
	height: auto;
	border-radius: 4px;
	border: 1px solid rgba(212, 175, 55, 0.2);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* General sections */

.container {
	justify-content: center;
	max-width: var(--max-width);
	margin: 0 auto;
}

section {
	margin:1em 0;
}

.section-header {
	text-align: center;
	margin-bottom: 4rem;
}

.section-header h2 {
	font-size: 2.5rem;
	font-family: var(--font-heading);
	color: var(--accent-cerelith);
	margin-bottom: 1rem;
}

/* Content Sections */

.panel, .sidebar {
	background: var(--bg-surface-fade);
	background: var(--bg-surface);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(212, 175, 55, 0.15);
	border-radius: 8px;
	padding: 2rem;
	color: var(--text-panel-main); /* Keep text light in dark panels */
}

.panel label, 
.sidebar label {
	font-weight:bold;
	color:white;
}

.panel .link-button,
.sidebar .link-button {
	color: white;
}

.panel button,
.sidebar button {
	background-color: var(--accent-sand);
	color: black;
}

.sidebar {
	position: sticky;
	top: 100px;
	max-width:400px;
}
/* Subscribing */

.subscribe-section {
	min-height: 70vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4rem 2rem;
}

.subscribe-card {
	padding: 4em;
	max-width: 600px;
	width: 100%;
	text-align: center;
	box-shadow: 0 20px 40px rgba(0,0,0,0.6);
	animation: fadeIn 1s ease-out;
	/*color: var(--text-panel-main);*/ /* Ensure card text stays light */
}

.subscribe-title {
	color: var(--accent-cerelith);
	font-size: 2.5rem;
	margin-bottom: 1rem;
}

.subscribe-description {
	margin-bottom: 2rem;
	font-size: 1.1rem;
}

/* Status & Representation Banner Styling (Combined) */

.notice {
	margin: 1em 0;
	background: var(--bg-deep-rift);
	border-left: 4px solid var(--accent-cerelith);
	opacity: 0.9;
	color: var(--text-main);
	padding: 1rem 1.5rem;
	text-align: left;
	border-radius: 0 8px 8px 0;
}

.notice h4 {
	color: var(--accent-sand);
}

.callout-banner {
	margin-top: 3rem;
	background: rgba(212, 175, 55, 0.1);
	color: var(--text-main);
	border-left: 4px solid var(--accent-cerelith);
	padding: 1rem 1.5rem;
	opacity: 0.8;
	text-align: left;
	border-radius: 0 8px 8px 0;
}

.callout-banner h4 {
	color: var(--text-main); /* Adapts */
	margin-bottom: 0.5rem;
	font-size: 1.2rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.callout-banner p {
	font-size: 0.9rem;
}

/* featured book */

.feature-section {
	display: grid;
	gap: 5rem;
	gap: 10vw;
	align-items: center;
	margin: 5em;
	margin-top: 0;
}

.feature-section h3 {
	font-size: 2rem;
	margin-bottom: 1rem;
	font-family: var(--font-heading);
	font-weight: bold;
	/*color: white;*/
}

.feature-section p {
	margin-bottom: 2rem;
	font-size: 1.1rem;
}


/* Form Elements */
.form-group {
	margin-bottom: 1.5rem;
	text-align: left;
	max-width: 400px;
	margin-inline: auto;
}

.form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-family: var(--font-heading);
	letter-spacing: 0.05em;
}

.form-group.legal label {
	font-family: arial;
	font-size: 0.8em;
	font-style: italic;
	color: var(--text-blue-light);
	font-weight:normal;
}

.form-group.form-control-alt {
	position: absolute;
	opacity: 0.1;
	font-size: 10px;
	right: 5000px;
}

.form-field {
	width: 100%;
	padding: var(--field-padding);
	background: rgba(8, 11, 17, 0.8);
	border: 1px solid rgba(255,255,255,0.1);
	color: var(--text-panel-main);
	border-radius: 4px;
	font-size: 0.9rem;
	font-family: var(--font-body);
	transition: border-color var(--transition-speed) ease;
}

.form-field:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.align-center {
	text-align: center;
}

.controls {
	margin-top: 2.5rem;
	display: flex;
	justify-content: center;
	gap: 1em;
}

button, .link-button {
	cursor: pointer;
	display: inline-block;
	padding: var(--field-padding);
	padding: 0.75rem 1.5rem;
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 0.9rem;
	border-radius: 2px;
	border: 1px solid rgba(255,255,255,0.1);
	border-bottom: 1px solid var(--border-gentle, grey);
	box-shadow: 0 0px 1px rgba(0, 0, 0, 0.3);
	margin-top: 1rem;
	background-color: var(--accent-sand);
	color: var(--text-main);
	transition: color var(--transition-speed) ease;
	line-height: 1.6em;
}

button:hover {
	color: var(--accent-sand-hover);
}

button:disabled {
	opacity: 0.9;
	background-color: transparent;
	cursor: not-allowed;
	color: grey;
}

.link-button {
	background-color: transparent;
	border-radius: 2px;
	transition: all var(--transition-speed) ease;
	margin-left: 1rem;
}

.link-button.special {
	background-color: var(--accent-sand);
	color: #080B11; /* Hardcoded dark so text reads on gold button in both modes */
}

.link-button:hover {
	border-color: var(--text-main);
	background: rgba(255,255,255,0.05);
}

.link-button.special:hover {
	background-color: transparent;
	color: var(--accent-sand);
}

.toggle-button {
	width: auto;
	background: none;
	border: 0px none;
	margin: 0;
}

/* Large screens only */
@media (min-width: 768px) {

	.about-grid {
		grid-template-columns: 1fr 2.5fr;
		gap: 4rem;
		align-items: center;
	}

	.feature-section {
		grid-template-columns: 1fr 1fr;
	}

	.site-header {
		position: sticky;
	}

	.nav-container {
		padding:1rem 2rem;
	}


}

/* Medium and smaller */
@media (max-width: 768px) {

	.about-grid {
		grid-template-columns: 1fr;
		/*gap: 2rem;*/
	}

	.sidebar {
		position: relative;
		top: 0;
	}

	.feature-section {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.link-button {
		margin-left: 0;
		margin-top: 1rem;
	}

	.book-cover {
		max-width: 400px;
		margin: 0 auto;
	}

	.nav-container {
		flex-direction: column;
		gap: 1rem;
	}

	.nav-links {
		gap: 1rem;
		flex-wrap: wrap;
		justify-content: center;
	}

	.header-controls {
		position: absolute;
		top: 4px;
		right: 4px;
	}

	.subscribe-card {
		padding: 2em;
	}

	.subscribe-title {
		font-size: 2em;
	}

}

/* Mobile */
@media screen and (max-width: 480px) and (orientation: portrait) {

	
}



/* Animations */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes shimmer {
	0% {
		transform: skewX(-20deg) translateX(-150%);
	}

	50% {
		transform: skewX(-20deg) translateX(150%);
	}

	100% {
		transform: skewX(-20deg) translateX(150%);
	}
}
