/*
 * theme-layout.css
 * WordPress-specific layout styles for the Prysmedge theme.
 * Handles: header, footer, content layout, single post hero,
 * buttons, project cards, blog archive cards, and mobile nav.
 *
 * Depends on: style.css (design tokens / base resets)
 *
 * @package Prysmedge
 */

/* =============================================================================
   BODY OFFSET FOR FIXED HEADER
   Only the front page scrollytelling hero needs a body offset (its sticky
   panel uses top-20 which requires the container to start at y=80px). All
   inner page templates carry their own top padding (py-20 etc.) that clears
   the fixed nav — exactly as the original static HTML worked (no body offset).
   ============================================================================= */

/* Prevent off-canvas mobile drawer from causing horizontal scroll on any page */
body {
	overflow-x: hidden;
}

body.front-page {
	padding-top: 80px;
}

/* =============================================================================
   SITE HEADER
   ============================================================================= */

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	background: transparent;
	transition: background 0.3s;
}

.site-header.header-sticky {
	background: rgba(10, 10, 10, 0.9);
	backdrop-filter: blur(12px);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 2rem;
	max-width: 1400px;
	margin: 0 auto;
	gap: 2rem;
}

/* Branding */
.site-branding {
	flex-shrink: 0;
}

.site-name-link {
	color: #fff;
	text-decoration: none;
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: 0.15em;
	text-transform: uppercase;
}

/* Primary navigation */
.main-navigation {
	display: flex;
	align-items: center;
}

.nav-links {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 2.5rem;
	align-items: center;
}

.nav-links li {
	margin: 0;
}

.nav-links a {
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	transition: color 0.2s;
}

.nav-links a:hover {
	color: #f97316;
}

.nav-links .current-menu-item a {
	color: #f97316;
}

/* Header actions (CTA button, etc.) */
.header-actions {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-shrink: 0;
}

/* Mobile hamburger toggle */
.mobile-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px;
	flex-direction: column;
	gap: 5px;
}

.hamburger-bar {
	display: block;
	width: 22px;
	height: 2px;
	background: rgba(255, 255, 255, 0.8);
	border-radius: 1px;
	transition: 0.3s;
}

/* =============================================================================
   ADMIN BAR OFFSET
   ============================================================================= */

.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

/* =============================================================================
   MOBILE NAVIGATION  (max-width: 768px)
   ============================================================================= */

@media (max-width: 768px) {
	.mobile-toggle {
		display: flex;
	}

	.main-navigation {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: rgba(10, 10, 10, 0.97);
		padding: 1.5rem 2rem;
		display: none;
	}

	.main-navigation.is-open {
		display: block;
	}

	.nav-links {
		flex-direction: column;
		gap: 0;
	}

	.nav-links a {
		padding: 0.75rem 0;
		border-bottom: 1px solid rgba(255, 255, 255, 0.08);
		display: block;
	}
}

/* =============================================================================
   SITE FOOTER
   ============================================================================= */

.site-footer {
	background: var(--color-footer-bg, #171717);
	color: rgba(255, 255, 255, 0.6);
	padding: 4rem 0 0;
}

.footer-main {
	padding-bottom: 3rem;
}

/* Footer grid — 3 columns on desktop, single column on mobile */
.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 3rem;
}

@media (max-width: 768px) {
	.footer-grid {
		grid-template-columns: 1fr;
	}
}

/* Brand column */
.footer-brand {
	max-width: 340px;
}

.footer-tagline {
	font-size: 1.125rem;
	font-weight: 600;
	color: #fff;
	line-height: 1.4;
	margin-bottom: 1rem;
}

.footer-desc {
	font-size: 0.875rem;
	line-height: 1.6;
	margin-bottom: 1.5rem;
	color: rgba(255, 255, 255, 0.5);
}

/* Column headings */
.footer-column-title {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.35);
	margin-bottom: 1rem;
}

/* Navigation lists inside footer columns */
.footer-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-nav-list li {
	margin-bottom: 0.625rem;
}

.footer-nav-list a {
	color: rgba(255, 255, 255, 0.55);
	text-decoration: none;
	font-size: 0.875rem;
	transition: color 0.2s;
}

.footer-nav-list a:hover {
	color: #f97316;
}

/* Footer bottom bar */
.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	padding: 1.25rem 0;
}

.footer-bottom-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.footer-copyright {
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.35);
	margin: 0;
}

.footer-legal-links {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 1.5rem;
}

.footer-legal-links a {
	color: rgba(255, 255, 255, 0.35);
	text-decoration: none;
	font-size: 0.8125rem;
	transition: color 0.2s;
}

.footer-legal-links a:hover {
	color: #f97316;
}

/* =============================================================================
   CONTENT LAYOUT
   ============================================================================= */

.container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 2rem;
}

#content {
	padding-top: 2rem;
}

.entry-content {
	max-width: 760px;
	margin: 0 auto;
	line-height: 1.8;
}

.page-title {
	font-size: clamp(2rem, 5vw, 3.5rem);
	font-weight: 800;
	margin-bottom: 1rem;
}

/* Archive hero */
.archive-hero {
	padding: 5rem 0 3rem;
	text-align: center;
}

.archive-hero-title {
	font-size: clamp(2.5rem, 6vw, 4rem);
	font-weight: 800;
	color: #fff;
}

/* =============================================================================
   SINGLE POST HERO  (CRITICAL — prevents blank hero area)
   ============================================================================= */

.post-hero {
	position: relative;
	overflow: hidden;
	min-height: 420px;
	display: flex;
	align-items: flex-end;
	background: #0f0f0f; /* fallback when no featured image */
	margin-bottom: 3rem;
}

.post-hero.has-thumbnail {
	min-height: 560px;
}

.post-hero__image {
	position: absolute;
	inset: 0;
	object-fit: cover;
	width: 100%;
	height: 100%;
	opacity: 0.4;
}

.post-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 60%);
}

.post-hero__content {
	position: relative;
	z-index: 2;
	width: 100%;
	padding: 3rem 2rem 2.5rem;
	max-width: 900px;
	margin: 0 auto;
}

.post-hero__title {
	font-size: clamp(1.75rem, 4vw, 3rem);
	font-weight: 800;
	color: #fff;
	line-height: 1.2;
	margin-bottom: 1rem;
}

/* =============================================================================
   BUTTON STYLES
   ============================================================================= */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.75rem;
	border-radius: 9999px;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s;
	cursor: pointer;
	border: 2px solid transparent;
}

.btn-primary {
	background: #f97316;
	color: #fff;
	border-color: #f97316;
}

.btn-primary:hover {
	background: #171717;
	border-color: #171717;
	color: #fff;
	transform: translateY(-1px);
}

.btn-secondary {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
	border-color: #f97316;
	color: #f97316;
}

/* =============================================================================
   PROJECT CARDS  (archive-project.php)
   ============================================================================= */

.projects-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
	gap: 2rem;
	margin-top: 3rem;
}

.project-card {
	background: #1a1a1a;
	border-radius: 1rem;
	overflow: hidden;
	transition: transform 0.2s;
}

.project-card:hover {
	transform: translateY(-4px);
}

.project-card__image {
	aspect-ratio: 16 / 9;
	background: #222;
	overflow: hidden;
}

.project-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.project-card__body {
	padding: 1.5rem;
}

.project-card__title {
	font-size: 1.125rem;
	font-weight: 700;
	color: #fff;
	margin-bottom: 0.5rem;
}

.project-card__meta {
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.5);
}

/* =============================================================================
   BLOG ARCHIVE POST CARDS
   ============================================================================= */

.post-card {
	background: #1a1a1a;
	border-radius: 1rem;
	overflow: hidden;
	transition: transform 0.2s;
}

.post-card:hover {
	transform: translateY(-4px);
}

.post-card__image {
	aspect-ratio: 16 / 9;
	background: #222;
}

.post-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-card__body {
	padding: 1.5rem;
}

.post-card__category {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #f97316;
	margin-bottom: 0.5rem;
}

.post-card__title {
	font-size: 1.125rem;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
	margin-bottom: 0.5rem;
}

.post-card__excerpt {
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.55);
	line-height: 1.6;
}

.post-card__meta {
	display: flex;
	gap: 1rem;
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.4);
	margin-top: 1rem;
}

/* =============================================================================
   MOBILE UX FIXES
   ============================================================================= */

/* Hero: collapse the 400vh scroll-spacer on mobile — the building SVG is
   already hidden (hidden lg:flex), so there's nothing to animate. */
@media (max-width: 1023px) {
	#hero-scroll-container {
		height: 100vh !important;
	}
}

/* Partner logo marquee animation — moved from inline <style> in about.php */
@keyframes partner-scroll {
	0%   { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}
.animate-scroll {
	animation: partner-scroll 30s linear infinite;
}

/* Partner strip: tighten vertical padding on mobile */
@media (max-width: 767px) {
	.partner-strip {
		padding-top: 2.5rem;
		padding-bottom: 2.5rem;
	}
	.partner-strip-heading {
		margin-bottom: 2rem;
	}
}
