/* Reset */
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	/* Design System Colors */
	--color-bg: #0B0D10;
	/* Near-black charcoal */
	--color-accent: #0A2A5E;
	/* Deep blue */
	--color-accent-hover: #0E3A7C;
	--color-text-primary: #FFFFFF;
	--color-text-secondary: #C7CDD6;
	--color-divider: #1F3558;
	--color-muted: #4A6FA5;

	/* Typography */
	--font-primary: 'Inter', sans-serif;
	--font-size-h1: 56px;
	--font-size-body: 18px;
	--font-size-label: 14px;

	/* Spacing */
	--spacing-container: 120px;
	--spacing-section: 80px;
	--spacing-element: 24px;
}

body {
	background-color: var(--color-bg);
	color: var(--color-text-primary);
	font-family: var(--font-primary);
	font-size: var(--font-size-body);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.container {
	max-width: 1000px;
	margin: 0 auto;
	/* padding: 0 40px 80px 40px; */
	/* Remove top padding to let hero fill screen */
}

/* Hero / Intro Screen */
.hero-screen {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	margin-bottom: var(--spacing-container);
	opacity: 0;
	animation: fadeIn 2s ease-out forwards;
}

.hero-content {
	max-width: 100%;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.hero-logo {
	/* width: auto;*/
	width: 90vw;
	height: auto;

	max-width: 100%;
	max-height: 55vh;
	/* Dynamic margin: 16px on small screens, scaling to 40px on large screens */
	margin-bottom: clamp(2px, 0.5vh, 6px);
	filter: brightness(0.9);
	/* Slight mute to fit stealth theme */
}

/* Typography override for Hero */
.hero-tagline {
	font-size: 32px;
	/* Smaller than previous H1 to verify hierarchy with logo */
	font-weight: 500;
	letter-spacing: 1px;
	margin-bottom: clamp(4px, 1vh, 10px);
	color: var(--color-text-primary);
	text-transform: uppercase;
}

.hero-description {
	font-size: 18px;
	color: var(--color-text-secondary);
	margin-bottom: clamp(4px, 1vh, 10px);
	max-width: 600px;
	line-height: 1.6;
}

@keyframes fadeIn {
	0% {
		opacity: 0;
		transform: translateY(20px);
	}

	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Typography */
h1 {
	font-size: var(--font-size-h1);
	font-weight: 500;
	/* Medium, no bold */
	line-height: 1.2;
	margin-bottom: 24px;
	letter-spacing: -1.5px;
}

.section-label {
	font-size: var(--font-size-label);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: var(--color-muted);
	margin-bottom: 40px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--color-divider);
}

/* Sections */
.section {
	margin-bottom: var(--spacing-container);
}

/* CTA Button */
.cta-button {
	display: inline-block;
	padding: 16px 32px;
	background-color: var(--color-accent);
	color: var(--color-text-primary);
	text-decoration: none;
	font-weight: 500;
	transition: background-color 0.2s ease;
	border: 1px solid transparent;
}

.cta-button:hover {
	background-color: var(--color-accent-hover);
}

/* Lists */
.filter-list,
.signal-list {
	list-style: none;
	padding-left: 0;
}

.filter-list li,
.signal-list li {
	margin-bottom: 16px;
	font-size: 20px;
	color: var(--color-text-secondary);
}

/* Grid Layouts */
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 40px;
}

.grid-item h3 {
	margin-bottom: 12px;
	font-weight: 500;
	color: var(--color-text-primary);
}

.grid-item p {
	color: var(--color-text-secondary);
	font-size: 16px;
}

/* Contact Form */
.contact-form {
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 600px;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.form-group label {
	font-size: 14px;
	color: var(--color-text-secondary);
	text-transform: uppercase;
	letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
	background-color: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--color-divider);
	color: var(--color-text-primary);
	padding: 16px;
	font-family: var(--font-primary);
	font-size: 16px;
	outline: none;
	transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
	border-color: var(--color-muted);
}

.submit-button {
	align-self: flex-start;
	padding: 16px 40px;
	background-color: transparent;
	color: var(--color-text-primary);
	border: 1px solid var(--color-text-secondary);
	cursor: pointer;
	font-family: var(--font-primary);
	font-size: 16px;
	transition: all 0.2s ease;
}

.submit-button:hover {
	background-color: var(--color-text-primary);
	color: var(--color-bg);
}

.form-note {
	margin-top: 24px;
	font-size: 14px;
	color: var(--color-muted);
	font-style: italic;
}

.required {
	color: #e74c3c;
}

.contact-note {
	margin-top: 0;
	margin-bottom: 8px;
	font-size: 13px;
}

footer {
	border-top: 1px solid var(--color-divider);
	padding-top: 40px;
	color: var(--color-muted);
	font-size: 14px;
	text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
	:root {
		--font-size-h1: 40px;
		--spacing-container: 80px;
	}

	.container {
		padding: 40px 24px;
	}

	.hero-screen {
		align-items: flex-start;
		padding-top: 2vh;
	}

	.hero-logo {
		width: 120vw;
		max-width: none;
		max-height: none;
	}

	.hero-tagline {
		font-size: 24px;
	}
}

/* Burger Button */
.burger-btn {
	position: fixed;
	top: 24px;
	right: 24px;
	z-index: 1002;
	background: transparent;
	border: none;
	cursor: pointer;
	width: 32px;
	height: 24px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 0;
}

.burger-btn span {
	display: block;
	width: 100%;
	height: 2px;
	background-color: var(--color-text-secondary);
	transition: background-color 0.2s ease;
}

.burger-btn:hover span {
	background-color: var(--color-text-primary);
}

/* Menu Overlay */
.menu-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(0, 0, 0, 0.6);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

body.is-menu-visible .menu-overlay {
	opacity: 1;
	pointer-events: auto;
}

/* Sidebar Menu */
#menu {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 1001;
	width: 300px;
	max-width: 80vw;
	height: 100%;
	background: var(--color-bg);
	border-left: 1px solid var(--color-divider);
	transform: translateX(100%);
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
	padding: 80px 40px 40px;
}

body.is-menu-visible #menu {
	transform: translateX(0);
}

.menu-close {
	position: absolute;
	top: 24px;
	right: 24px;
	background: transparent;
	border: none;
	color: var(--color-text-secondary);
	font-size: 28px;
	cursor: pointer;
	line-height: 1;
	padding: 0;
	transition: color 0.2s ease;
}

.menu-close:hover {
	color: var(--color-text-primary);
}

#menu ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

#menu a {
	color: var(--color-text-secondary);
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 2px;
	transition: color 0.2s ease;
}

#menu a:hover {
	color: var(--color-text-primary);
}

@media print {
	.burger-btn,
	#menu,
	.menu-overlay {
		display: none;
	}
}

/* ── Posts Page ── */

/* Loader */
.posts-loader {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 80px 0;
}

.loader-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid var(--color-divider);
	border-top-color: var(--color-muted);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* Infinite scroll sentinel */
.posts-sentinel {
	display: flex;
	justify-content: center;
	padding: 40px 0;
}

.posts-sentinel .loader-spinner {
	display: none;
}

.posts-sentinel.loading .loader-spinner {
	display: block;
}

/* States */
.posts-error,
.posts-empty {
	text-align: center;
	color: var(--color-muted);
	font-style: italic;
	padding: 60px 0;
}

/* Posts list */
.posts-list {
	display: flex;
	flex-direction: column;
	gap: 60px;
}

/* Post card */
.post-card {
	border: 1px solid var(--color-divider);
	transition: border-color 0.3s ease;
}

.post-card:hover {
	border-color: var(--color-muted);
}

.post-card__image {
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

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

.post-card:hover .post-card__image img {
	transform: scale(1.02);
}

.post-card__body {
	padding: 32px;
}

.post-card__title {
	font-size: 22px;
	font-weight: 500;
	color: var(--color-text-primary);
	margin-bottom: 12px;
}

.post-card__meta {
	font-size: 13px;
	color: var(--color-muted);
	margin-bottom: 16px;
	letter-spacing: 1px;
}

.post-card__content {
	color: var(--color-text-secondary);
	font-size: 16px;
	line-height: 1.6;
}

.post-card__link {
	display: inline-block;
	margin-top: 16px;
	color: var(--color-muted);
	font-size: 13px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 2px;
	text-decoration: none;
	transition: color 0.2s ease;
}

.post-card__link:hover {
	color: var(--color-text-primary);
}

/* Rich text inside expanded content */
.post-card__content h1,
.post-card__content h2,
.post-card__content h3 {
	color: var(--color-text-primary);
	margin: 24px 0 12px;
	font-weight: 500;
}

.post-card__content p {
	color: var(--color-text-secondary);
	margin-bottom: 12px;
	line-height: 1.6;
}

.post-card__content a {
	color: var(--color-muted);
	text-decoration: underline;
}

.post-card__content ul {
	list-style: disc;
	padding-left: 24px;
	margin-bottom: 12px;
}

.post-card__content ol {
	list-style: decimal;
	padding-left: 24px;
	margin-bottom: 12px;
}

.post-card__content li {
	display: list-item;
	margin-bottom: 8px;
	font-size: 16px;
	line-height: 1.6;
	color: var(--color-text-secondary);
}

.post-card__content img {
	max-width: 100%;
	height: auto;
	margin: 16px 0;
}

/* Scroll reveal */
.scroll-reveal {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Posts header */
.posts-header {
	padding-top: 80px;
}

/* Responsive — posts */
@media (max-width: 768px) {
	.posts-header {
		padding-top: 60px;
	}

	.posts-list {
		gap: 40px;
	}

	.post-card__body {
		padding: 20px;
	}

	.post-card__title {
		font-size: 18px;
	}

	.post-card__excerpt {
		font-size: 15px;
	}
}