/**
 * LivWorks Development Landing Page Styles
 * Modern, mobile-first design for companion technology company
 */

/* Reset and Base Styles */
* {
	box-sizing: border-box;
}

html {
	overflow-x: hidden;
	scroll-behavior: smooth;
}

body {
	overflow-x: hidden;
	width: 100%;
	max-width: 100vw;
	margin: 0;
	padding: 0;
}

/* Global Variables - Sunset Theme with LivWorks Green */
:root {
	--lwd-primary-color: #ff6b35; /* Sunset Orange */
	--lwd-secondary-color: #f7931e; /* Golden Orange */
	--lwd-accent-color: #ff9a56; /* Coral */
	--lwd-brand-green: #4a7c59; /* LivWorks Logo Green */
	--lwd-deep-sunset: #e55100; /* Deep Sunset */
	--lwd-warm-gold: #ffc107; /* Warm Gold */
	--lwd-text-primary: #2d3748; /* Dark Gray */
	--lwd-text-secondary: #4a5568; /* Medium Gray */
	--lwd-text-light: #718096; /* Light Gray */
	--lwd-background-light: #fff8f0; /* Warm Light Background */
	--lwd-background-warm: #fffbf7; /* Very Light Warm */
	--lwd-background-white: #ffffff;
	--lwd-border-light: #e2e8f0;
	--lwd-shadow-sm: 0 1px 3px rgba(255, 107, 53, 0.1);
	--lwd-shadow-md: 0 4px 6px rgba(255, 107, 53, 0.1);
	--lwd-shadow-lg: 0 10px 25px rgba(255, 107, 53, 0.15);
	--lwd-shadow-warm: 0 4px 20px rgba(255, 154, 86, 0.2);
	--lwd-border-radius: 12px;
	--lwd-transition: all 0.3s ease;
}

/* Header Styles */
.lwd-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	background: linear-gradient(135deg, var(--lwd-text-primary) 0%, #1a202c 100%);
	color: var(--lwd-background-white);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	transition: var(--lwd-transition);
}

.lwd-header.scrolled {
	background: linear-gradient(135deg, var(--lwd-text-primary) 0%, #1a202c 100%);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lwd-header-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
}

.lwd-header-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 70px;
}

/* Header Logo Styles */
.lwd-header-logo {
	flex-shrink: 0;
}

.lwd-logo-link {
	display: block;
	text-decoration: none;
	transition: var(--lwd-transition);
}

.lwd-header-logo-img {
	height: 50px;
	width: auto;
	max-width: 180px;
	transition: var(--lwd-transition);
	filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(255, 255, 255, 0.1));
}

.lwd-logo-link:hover .lwd-header-logo-img {
	transform: scale(1.05);
	filter: brightness(0) invert(1) drop-shadow(0 3px 6px rgba(255, 255, 255, 0.2));
}

/* Header Text (Site Title/Tagline) */
.lwd-header-text {
	display: none; /* Hidden by default, can be enabled via customizer */
	flex-grow: 1;
	margin-left: 1rem;
}

.lwd-header-text.show {
	display: block;
}

.site-title {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
}

.site-title a {
	color: var(--lwd-background-white);
	text-decoration: none;
	transition: var(--lwd-transition);
}

.site-title a:hover {
	color: var(--lwd-primary-color);
}

.site-description {
	margin: 0;
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.8);
	line-height: 1.3;
}

/* Navigation Styles */
.lwd-nav {
	display: flex;
	align-items: center;
}

.lwd-nav-menu {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 2rem;
}

.lwd-nav-menu li {
	position: relative;
}

.lwd-nav-menu a {
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.95rem;
	padding: 0.5rem 0;
	transition: var(--lwd-transition);
	position: relative;
}

.lwd-nav-menu a:hover,
.lwd-nav-menu a:focus,
.lwd-nav-menu .current-menu-item > a {
	color: var(--lwd-primary-color);
}

.lwd-nav-menu a::after {
	content: "";
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 2px;
	background: linear-gradient(135deg, var(--lwd-primary-color), var(--lwd-secondary-color));
	transition: width 0.3s ease;
}

.lwd-nav-menu a:hover::after,
.lwd-nav-menu .current-menu-item > a::after {
	width: 100%;
}

/* Mobile Menu Toggle */
.lwd-mobile-menu-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
}

.lwd-menu-icon {
	display: flex;
	flex-direction: column;
	width: 24px;
	height: 18px;
	position: relative;
}

.lwd-menu-icon span {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--lwd-background-white);
	transition: var(--lwd-transition);
	transform-origin: center;
}

.lwd-menu-icon span:nth-child(1) {
	transform: translateY(0);
}

.lwd-menu-icon span:nth-child(2) {
	transform: translateY(6px);
}

.lwd-menu-icon span:nth-child(3) {
	transform: translateY(12px);
}

/* Mobile menu active state */
.lwd-mobile-menu-toggle[aria-expanded="true"] .lwd-menu-icon span:nth-child(1) {
	transform: translateY(8px) rotate(45deg);
}

.lwd-mobile-menu-toggle[aria-expanded="true"] .lwd-menu-icon span:nth-child(2) {
	opacity: 0;
}

.lwd-mobile-menu-toggle[aria-expanded="true"] .lwd-menu-icon span:nth-child(3) {
	transform: translateY(4px) rotate(-45deg);
}

/* Skip Link */
.skip-link {
	position: absolute;
	left: -9999px;
	top: -9999px;
	color: var(--lwd-primary-color);
	text-decoration: none;
	padding: 0.5rem 1rem;
	background: var(--lwd-background-white);
	border: 1px solid var(--lwd-primary-color);
	border-radius: var(--lwd-border-radius);
	font-weight: 600;
}

.skip-link:focus {
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 9999;
}

/* Body padding for fixed header */
body {
	padding-top: 0;
}

/* WordPress Block Alignment Fixes for Mobile */
.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

@media (max-width: 768px) {
	.alignfull {
		width: 100%;
		max-width: 100%;
		margin-left: 0;
		margin-right: 0;
	}
}

/* Prevent WordPress columns from overflowing */
.wp-block-columns {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.wp-block-column {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow-wrap: break-word;
}

/* Ensure WordPress cover blocks don't overflow */
.wp-block-cover {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow: hidden;
}

.wp-block-cover__inner-container {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* Footer Styles */
.lwd-footer {
	background: linear-gradient(135deg, var(--lwd-text-primary) 0%, #1a202c 100%);
	color: var(--lwd-background-white);
	padding: 3rem 0 1.5rem;
	margin-top: 4rem;
}

.lwd-footer-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
}

.lwd-footer-content {
	text-align: center;
}

.lwd-footer-logo {
	margin-bottom: 2rem;
}

.lwd-footer-logo-img {
	height: 40px;
	width: auto;
	max-width: 150px;
	filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(255, 255, 255, 0.1));
}

.lwd-footer-nav {
	margin-bottom: 2rem;
}

.lwd-footer-menu {
	display: flex;
	justify-content: center;
	gap: 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

.lwd-footer-menu a {
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
	font-weight: 500;
	transition: var(--lwd-transition);
}

.lwd-footer-menu a:hover,
.lwd-footer-menu a:focus {
	color: var(--lwd-primary-color);
}

.lwd-footer-text {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 2rem;
	text-align: center;
	max-width: 600px;
	margin: 0 auto;
}

.lwd-footer-text p {
	margin: 0 0 0.5rem;
	opacity: 0.8;
	text-align: center;
}

.lwd-footer-tagline {
	font-size: 0.9rem;
	max-width: 600px;
	margin: 1rem auto 0;
	line-height: 1.6;
	text-align: center !important;
}

/* Responsive Design */
@media (max-width: 768px) {
	.lwd-header-content {
		height: 60px;
	}

	.lwd-header-logo-img {
		height: 40px;
		max-width: 150px;
	}

	.lwd-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: linear-gradient(135deg, var(--lwd-text-primary) 0%, #1a202c 100%);
		border-top: 1px solid rgba(255, 255, 255, 0.1);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
		padding: 1rem;
	}

	.lwd-nav.active {
		display: block;
	}

	.lwd-nav-menu {
		flex-direction: column;
		gap: 0;
	}

	.lwd-nav-menu li {
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}

	.lwd-nav-menu li:last-child {
		border-bottom: none;
	}

	.lwd-nav-menu a {
		display: block;
		padding: 1rem 0;
		font-size: 1rem;
	}

	.lwd-mobile-menu-toggle {
		display: flex;
	}

	.lwd-hero-section {
		margin-top: 60px;
	}
}

@media (max-width: 480px) {
	.lwd-header-container {
		padding: 0 0.75rem;
	}

	.lwd-header-logo-img {
		height: 35px;
		max-width: 120px;
	}

	.lwd-footer-menu {
		flex-direction: column;
		gap: 1rem;
	}

	.lwd-footer-text p {
		font-size: 0.9rem;
	}

	.lwd-footer-tagline {
		font-size: 0.8rem;
		text-align: center !important;
	}
} /* Typography Enhancements */
body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.6;
	color: var(--lwd-text-primary);
	overflow-wrap: break-word;
	word-wrap: break-word;
}

/* Ensure text doesn't cause overflow */
h1,
h2,
h3,
h4,
h5,
h6,
p,
div,
span {
	max-width: 100%;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

/* Icon Styles */
.lwd-icon-wrapper {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	background: linear-gradient(135deg, var(--lwd-primary-color), var(--lwd-secondary-color));
	border-radius: 50%;
	margin-bottom: 1rem;
	transition: var(--lwd-transition);
}

.lwd-icon {
	width: 1.5rem;
	height: 1.5rem;
	color: white;
	stroke-width: 2.5;
}

.lwd-mission-card .lwd-icon-wrapper {
	margin-bottom: 1.5rem;
}

.lwd-focus-item .lwd-icon-wrapper {
	margin-bottom: 1rem;
	width: 2.5rem;
	height: 2.5rem;
}

.lwd-focus-item .lwd-icon {
	width: 1.25rem;
	height: 1.25rem;
}

.lwd-icon-wrapper:hover {
	transform: scale(1.1);
	box-shadow: var(--lwd-shadow-lg);
}

/* Gradient Text Effect */
.lwd-gradient-text {
	background: linear-gradient(135deg, var(--lwd-primary-color) 0%, var(--lwd-secondary-color) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	display: inline-block;
}

/* Logo Styles */
.lwd-hero-logo {
	margin: 0 auto;
	text-align: center;
	animation: fadeInDown 1s ease-out;
}

.lwd-logo-img {
	max-width: 300px;
	height: auto;
	filter: drop-shadow(0 4px 8px rgba(255, 107, 53, 0.2));
	transition: var(--lwd-transition);
}

.lwd-logo-img:hover {
	filter: drop-shadow(0 6px 12px rgba(255, 107, 53, 0.3));
	transform: scale(1.02);
}

/* Hero Section */
.lwd-hero-section {
	position: relative;
	overflow: hidden;
	margin-top: 70px;
	width: 100%;
	max-width: 100vw;
	opacity: var(--hero-transparency);
	transition: opacity 0.1s ease-out;
}

.lwd-hero-cover {
	background: linear-gradient(135deg, var(--lwd-background-warm) 0%, #fff4e6 25%, #ffe8cc 50%, var(--lwd-background-light) 75%, var(--lwd-background-warm) 100%);
	position: relative;
	width: 100%;
	overflow: hidden;
}

.lwd-hero-cover::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	background: radial-gradient(circle at 30% 30%, rgba(255, 107, 53, 0.08) 0%, transparent 50%), radial-gradient(circle at 70% 70%, rgba(247, 147, 30, 0.06) 0%, transparent 50%),
		radial-gradient(circle at 50% 100%, rgba(74, 124, 89, 0.04) 0%, transparent 60%);
	z-index: 1;
}

.lwd-hero-content {
	position: relative;
	z-index: 2;
	text-align: center;
	max-width: 900px;
	margin: 0 auto;
	width: 100%;
	padding: 0 1rem;
}

.lwd-hero-title {
	animation: fadeInUp 1s ease-out;
}

.lwd-hero-subtitle {
	animation: fadeInUp 1s ease-out 0.2s both;
}

.lwd-hero-buttons {
	animation: fadeInUp 1s ease-out 0.4s both;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: clamp(0.5rem, 2vw, 1rem);
	margin-top: clamp(2rem, 4vw, 3rem);
}

.lwd-hero-buttons .wp-block-button {
	margin: 0;
	flex: 0 1 auto;
}

/* CTA Buttons improved spacing */
.lwd-cta-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: clamp(0.75rem, 2.5vw, 1.25rem);
	margin-top: clamp(2rem, 4vw, 3rem);
}

.lwd-cta-buttons .wp-block-button {
	margin: 0;
	flex: 0 1 auto;
}

/* Primary Button Styles */
.lwd-primary-button .wp-block-button__link {
	background: linear-gradient(135deg, var(--lwd-primary-color) 0%, var(--lwd-secondary-color) 100%);
	border: none;
	border-radius: var(--lwd-border-radius);
	color: white;
	transition: var(--lwd-transition);
	box-shadow: var(--lwd-shadow-md);
}

.lwd-primary-button .wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: var(--lwd-shadow-lg);
}

/* Secondary Button Styles */
.lwd-secondary-button.is-style-outline .wp-block-button__link {
	border: 2px solid var(--lwd-primary-color);
	color: var(--lwd-primary-color);
	background: transparent;
	border-radius: var(--lwd-border-radius);
	transition: var(--lwd-transition);
}

.lwd-secondary-button.is-style-outline .wp-block-button__link:hover {
	background: var(--lwd-primary-color);
	color: white;
	transform: translateY(-2px);
}

/* Mission Section */
.lwd-mission-section {
	background: transparent;
	width: 100%;
	max-width: 100vw;
	overflow: hidden;
	position: relative;
	z-index: 1;
}

.lwd-section-title {
	position: relative;
	color: var(--lwd-text-primary);
}

.lwd-section-title::after {
	content: "";
	display: block;
	width: 80px;
	height: 4px;
	background: linear-gradient(135deg, var(--lwd-primary-color) 0%, var(--lwd-secondary-color) 100%);
	margin: 20px auto 0;
	border-radius: 2px;
}

.lwd-mission-grid {
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1.5rem, 4vw, 3rem);
}

.lwd-mission-card {
	background: var(--lwd-background-white);
	border: 1px solid var(--lwd-border-light);
	box-shadow: var(--lwd-shadow-sm);
	transition: var(--lwd-transition);
	height: 100%;
	display: flex;
	flex-direction: column;
}

.lwd-mission-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--lwd-shadow-lg);
	border-color: var(--lwd-primary-color);
}

.lwd-card-title {
	color: var(--lwd-text-primary);
}

.lwd-card-description {
	flex-grow: 1;
}

/* Focus Areas Section */
.lwd-focus-areas-section {
	background: linear-gradient(135deg, var(--lwd-background-light) 0%, #fff8f0 25%, #fffbf7 50%, var(--lwd-background-light) 100%);
	width: 100%;
	max-width: 100vw;
	overflow: hidden;
	position: relative;
}
.lwd-focus-grid {
	align-items: stretch;
	width: 100%;
	max-width: 100%;
}

.lwd-focus-card {
	height: 100%;
	transition: var(--lwd-transition);
	border: 1px solid transparent;
	box-shadow: var(--lwd-shadow-sm);
}

.lwd-focus-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--lwd-shadow-md);
	border-color: var(--lwd-primary-color);
}

.lwd-focus-title {
	color: var(--lwd-text-primary);
}

.lwd-focus-description {
	color: var(--lwd-text-secondary);
}

/* CTA Section */
.lwd-cta-section {
	background: linear-gradient(135deg, var(--lwd-primary-color) 0%, var(--lwd-secondary-color) 100%);
	position: relative;
	overflow: hidden;
	width: 100%;
	max-width: 100vw;
}

.lwd-cta-section::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
	z-index: 1;
}

.lwd-cta-section > * {
	position: relative;
	z-index: 2;
}

.lwd-cta-primary-button .wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.lwd-cta-secondary-button.is-style-outline .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.1);
	transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fadeInDown {
	from {
		opacity: 0;
		transform: translateY(-30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes slideInLeft {
	from {
		opacity: 0;
		transform: translateX(-30px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}
@keyframes slideInRight {
	from {
		opacity: 0;
		transform: translateX(30px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Advanced Scroll Animations & Layout Improvements */

/* Base states for animated elements */
.lwd-animate-ready {
	opacity: 0;
	transform: translateY(60px);
	transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lwd-animate-ready.lwd-animate-slide-left {
	transform: translateX(-60px) translateY(0);
}

.lwd-animate-ready.lwd-animate-slide-right {
	transform: translateX(60px) translateY(0);
}

.lwd-animate-ready.lwd-animate-scale {
	transform: scale(0.8) translateY(30px);
}

/* Animated in states */
.lwd-animate-in {
	opacity: 1 !important;
	transform: translateY(0) translateX(0) scale(1) !important;
}

/* Section spacing improvements */
.lwd-hero-section,
.lwd-mission-section,
.lwd-focus-areas-section,
.lwd-cta-section {
	scroll-margin-top: 2rem;
	position: relative;
	overflow: hidden;
}

/* Coherent vertical rhythm */
.lwd-mission-section {
	padding-top: clamp(4rem, 8vw, 6rem);
	padding-bottom: clamp(4rem, 8vw, 6rem);
}

.lwd-focus-areas-section {
	padding-top: clamp(4rem, 8vw, 6rem);
	padding-bottom: clamp(4rem, 8vw, 6rem);
}

.lwd-cta-section {
	padding-top: clamp(4rem, 8vw, 6rem);
	padding-bottom: clamp(4rem, 8vw, 6rem);
}

/* Parallax container */
.lwd-parallax-container {
	transform-style: preserve-3d;
}

/* Global parallax background for section transitions */
body {
	--parallax-bg-opacity: 0;
	--hero-transparency: 1;
}

body::after {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: url("../images/groove_lines_1.png");
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	background-attachment: fixed;
	opacity: var(--parallax-bg-opacity);
	z-index: -2;
	pointer-events: none;
	transition: opacity 0.3s ease-out;
}

/* Mission section - clean background */
.lwd-mission-section {
	background: transparent;
	position: relative;
	z-index: 1;
}

/* Progressive blur layers - 0px to 4px from top to 50% */
.lwd-mission-section::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 12.5%; /* 0-12.5% = 1px blur */
	backdrop-filter: blur(1px);
	pointer-events: none;
	z-index: -1;
}

.lwd-mission-section::after {
	content: "";
	position: absolute;
	top: 12.5%;
	left: 0;
	width: 100%;
	height: 12.5%; /* 12.5-25% = 2px blur */
	backdrop-filter: blur(2px);
	pointer-events: none;
	z-index: -1;
}

/* Additional blur layers using box-shadow technique */
.lwd-mission-section {
	background: 
		/* 25-37.5% = 3px blur */ linear-gradient(transparent, transparent) 0% 25% / 100% 12.5%, /* 37.5-50% = 4px blur */ linear-gradient(transparent, transparent) 0% 37.5% / 100% 12.5%;
}

/* Simulate remaining blur layers with nested elements approach */
.lwd-mission-section > .wp-block-group::before {
	content: "";
	position: absolute;
	top: -25%; /* relative to parent's 25% position */
	left: 0;
	width: 100%;
	height: 12.5%; /* covers 25-37.5% of mission section */
	backdrop-filter: blur(3px);
	pointer-events: none;
	z-index: -1;
}

.lwd-mission-section > .wp-block-group::after {
	content: "";
	position: absolute;
	top: -12.5%; /* relative to parent's 37.5% position */
	left: 0;
	width: 100%;
	height: 12.5%; /* covers 37.5-50% of mission section */
	backdrop-filter: blur(4px);
	pointer-events: none;
	z-index: -1;
}

/* Focus areas section parallax background */
.lwd-focus-areas-section::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: radial-gradient(circle at 20% 20%, rgba(255, 107, 53, 0.03) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(247, 147, 30, 0.03) 0%, transparent 50%);
	transform: translateZ(-1px) scale(1.1);
	z-index: -1;
}

/* Improved grid layouts with better spacing */
.lwd-mission-grid {
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: stretch;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
}

.lwd-focus-grid {
	gap: clamp(1rem, 3vw, 2rem);
	align-items: stretch;
}

/* Enhanced card hover effects */
.lwd-mission-card,
.lwd-focus-card {
	will-change: transform;
	backface-visibility: hidden;
	transform: translateZ(0);
}

.lwd-mission-card:hover {
	transform: translateY(-8px) scale(1.02);
	box-shadow: var(--lwd-shadow-lg);
}

.lwd-focus-card:hover {
	transform: translateY(-4px) scale(1.01);
	box-shadow: var(--lwd-shadow-md);
}

/* Staggered animations for items */
.lwd-mission-item {
	transition-delay: 0s;
}

.lwd-mission-item:nth-child(1) {
	transition-delay: 0.1s;
}
.lwd-mission-item:nth-child(2) {
	transition-delay: 0.2s;
}
.lwd-mission-item:nth-child(3) {
	transition-delay: 0.3s;
}

.lwd-focus-item {
	transition-delay: 0s;
}

.lwd-focus-item:nth-child(1) {
	transition-delay: 0.05s;
}
.lwd-focus-item:nth-child(2) {
	transition-delay: 0.1s;
}
.lwd-focus-item:nth-child(3) {
	transition-delay: 0.15s;
}
.lwd-focus-item:nth-child(4) {
	transition-delay: 0.2s;
}
.lwd-focus-item:nth-child(5) {
	transition-delay: 0.25s;
}
.lwd-focus-item:nth-child(6) {
	transition-delay: 0.3s;
}

/* Enhanced scroll indicators */
.lwd-scroll-progress {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, var(--lwd-primary-color) 0%, var(--lwd-secondary-color) 100%);
	transform-origin: left;
	transform: scaleX(0);
	z-index: 1000;
}

/* Floating elements animation */
@keyframes float {
	0%,
	100% {
		transform: translateY(0) rotate(0deg);
	}
	25% {
		transform: translateY(-10px) rotate(1deg);
	}
	50% {
		transform: translateY(-5px) rotate(0deg);
	}
	75% {
		transform: translateY(-15px) rotate(-1deg);
	}
}

.lwd-floating-element {
	animation: float 6s ease-in-out infinite;
}

.lwd-floating-element:nth-child(2n) {
	animation-delay: -2s;
}

.lwd-floating-element:nth-child(3n) {
	animation-delay: -4s;
}

/* Responsive Design */
@media (max-width: 1024px) {
	.lwd-hero-title {
		font-size: 3rem;
	}

	.lwd-section-title {
		font-size: 2rem;
	}
}

/* Tablet Layout - 2 columns for mission grid */
@media (max-width: 900px) {
	.lwd-mission-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: clamp(1.25rem, 3vw, 2rem);
	}
}

@media (max-width: 768px) {
	/* Ensure no horizontal overflow */
	body {
		overflow-x: hidden;
		max-width: 100vw;
	}

	/* Fix all sections for mobile */
	.lwd-hero-section,
	.lwd-mission-section,
	.lwd-focus-areas-section,
	.lwd-cta-section {
		width: 100%;
		max-width: 100vw;
		overflow-x: hidden;
	}

	.lwd-hero-content,
	.lwd-mission-section > .wp-block-group,
	.lwd-focus-areas-section > .wp-block-group,
	.lwd-cta-section > .wp-block-group {
		width: 100%;
		max-width: calc(100vw - 2rem);
		padding-left: 1rem;
		padding-right: 1rem;
		margin-left: auto;
		margin-right: auto;
		box-sizing: border-box;
	}

	.lwd-hero-title {
		font-size: 2.5rem;
		line-height: 1.2;
	}

	.lwd-hero-subtitle {
		font-size: 1.125rem;
	}

	.lwd-section-title {
		font-size: 1.75rem;
	}

	.lwd-hero-buttons {
		flex-direction: column;
		gap: 0.75rem;
		width: 100%;
		align-items: center;
	}

	.lwd-hero-buttons .wp-block-button {
		width: 100%;
		max-width: 280px;
	}

	.lwd-cta-buttons {
		flex-direction: column;
		gap: 0.75rem;
		width: 100%;
		align-items: center;
	}

	.lwd-cta-buttons .wp-block-button {
		width: 100%;
		max-width: 280px;
	}

	/* Force grid layouts to single column */
	.lwd-focus-grid {
		grid-template-columns: 1fr !important;
		width: 100%;
		max-width: 100%;
	}

	.lwd-mission-grid {
		grid-template-columns: 1fr !important;
		width: 100%;
		max-width: 100%;
	}

	/* Prevent transforms from causing overflow */
	.lwd-mission-card:hover,
	.lwd-focus-card:hover {
		transform: none;
	}

	/* Optimize parallax background for mobile */
	body::after {
		background-attachment: scroll;
		background-size: cover;
		background-position: center center;
	}

	/* Reduce parallax on mobile for performance but keep background */
	.lwd-mission-section::before {
		transform: none;
		background-attachment: scroll;
		background-size: cover;
		background-position: center center;
	}

	.lwd-focus-areas-section::before {
		transform: none;
		display: none;
	}
}

@media (max-width: 480px) {
	/* Enhanced mobile fixes */
	html,
	body {
		overflow-x: hidden;
		max-width: 100vw;
		width: 100%;
	}

	/* Ensure all containers fit within viewport */
	.lwd-hero-section,
	.lwd-mission-section,
	.lwd-focus-areas-section,
	.lwd-cta-section {
		width: 100%;
		max-width: 100vw;
		overflow-x: hidden;
	}

	/* Constrain all content containers */
	.lwd-hero-content,
	.lwd-mission-section > .wp-block-group,
	.lwd-focus-areas-section > .wp-block-group,
	.lwd-cta-section > .wp-block-group {
		width: 100%;
		max-width: calc(100vw - 1.5rem);
		padding-left: 0.75rem;
		padding-right: 0.75rem;
		margin-left: auto;
		margin-right: auto;
		box-sizing: border-box;
	}

	.lwd-hero-title {
		font-size: 2rem;
	}

	.lwd-hero-subtitle {
		font-size: 1rem;
	}

	.lwd-section-title {
		font-size: 1.5rem;
	}

	.lwd-hero-cover {
		padding-top: clamp(3rem, 8vw, 4rem);
		padding-bottom: clamp(3rem, 8vw, 4rem);
	}

	.lwd-mission-section,
	.lwd-focus-areas-section,
	.lwd-cta-section {
		padding-top: clamp(3rem, 8vw, 4rem);
		padding-bottom: clamp(3rem, 8vw, 4rem);
	}

	/* Stack buttons vertically on small screens */
	.lwd-hero-buttons,
	.lwd-cta-buttons {
		flex-direction: column;
		gap: 1rem;
		width: 100%;
		align-items: center;
	}

	.lwd-hero-buttons .wp-block-button,
	.lwd-cta-buttons .wp-block-button {
		width: 100%;
		max-width: 280px;
	}

	/* Ensure button links don't overflow */
	.wp-block-button__link {
		word-break: break-word;
		overflow-wrap: break-word;
		max-width: 100%;
		box-sizing: border-box;
	}

	/* Reduce card padding on mobile */
	.lwd-mission-card,
	.lwd-focus-card {
		padding: 1.25rem !important;
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
	}

	/* Disable hover effects and transforms on mobile */
	.lwd-mission-card:hover,
	.lwd-focus-card:hover,
	.lwd-logo-img:hover,
	.lwd-icon-wrapper:hover {
		transform: none !important;
	}

	/* Force single column layouts */
	.lwd-focus-grid,
	.lwd-mission-grid {
		grid-template-columns: 1fr !important;
		width: 100%;
		max-width: 100%;
		gap: 1rem !important;
	}

	/* Optimize mobile performance */
	body::after {
		background-attachment: scroll;
		background-size: cover;
		background-position: center center;
	}

	/* Disable complex animations on small screens but keep mission background */
	.lwd-mission-section::before {
		background-attachment: scroll;
		background-size: cover;
		background-position: center center;
		transform: none;
	}

	.lwd-focus-areas-section::before {
		display: none;
	}

	/* Prevent any floating elements from causing overflow */
	.lwd-floating-element {
		animation: none !important;
	}
}

/* Loading state improvements */
.lwd-loading {
	overflow-x: hidden;
}

.lwd-loading * {
	animation-play-state: paused;
}

.lwd-loaded .lwd-animate-ready {
	animation-play-state: running;
}

/* Enhanced focus states */
@media (min-width: 769px) {
	.wp-block-button__link:focus {
		transform: translateY(-2px) scale(1.02);
		transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	}
}

/* Container max-width improvements */
.lwd-hero-content,
.lwd-mission-section > .wp-block-group,
.lwd-focus-areas-section > .wp-block-group,
.lwd-cta-section > .wp-block-group {
	width: 100%;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

/* Global overflow protection */
* {
	max-width: 100%;
}

/* Specific element overflow fixes */
img,
svg,
video,
iframe,
canvas {
	max-width: 100%;
	height: auto;
}

/* Prevent any element from extending beyond viewport */
@media (max-width: 768px) {
	* {
		max-width: 100vw;
		box-sizing: border-box;
	}
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Focus States for Better Accessibility */
.wp-block-button__link:focus,
.lwd-primary-button .wp-block-button__link:focus,
.lwd-secondary-button .wp-block-button__link:focus,
.lwd-cta-primary-button .wp-block-button__link:focus,
.lwd-cta-secondary-button .wp-block-button__link:focus {
	outline: 2px solid var(--lwd-accent-color);
	outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
	.lwd-mission-card,
	.lwd-focus-card {
		border-width: 2px;
		border-color: var(--lwd-text-primary);
	}

	.lwd-gradient-text {
		-webkit-text-fill-color: var(--lwd-text-primary);
		background: none;
	}
}

/* Print Styles */
@media print {
	.lwd-hero-buttons,
	.lwd-cta-buttons {
		display: none;
	}

	.lwd-hero-cover,
	.lwd-cta-section {
		background: white !important;
		color: black !important;
	}

	.lwd-gradient-text {
		-webkit-text-fill-color: black;
		background: none;
	}
}
