@layer base {
	html {
		scroll-behavior: smooth;
		margin: 0;
		padding: 0;
		overflow-x: hidden;
	}
	body {
		font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
		margin: 0;
		padding: 0;
		overflow-x: hidden;
		line-height: 1.6;
	}
	img {
		user-select: none;
		-webkit-user-select: none;
		-moz-user-select: none;
		-ms-user-select: none;
		pointer-events: none;
	}
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide::-webkit-scrollbar {
	display: none;
}
.scrollbar-hide {
	-ms-overflow-style: none;
	scrollbar-width: none;
}

/* Carousel photo styling */
.carousel-photo {
	min-width: 160px;
	width: 160px;
	height: 240px;
	object-fit: cover;
	border-radius: 0.75rem;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	flex-shrink: 0;
}

.carousel-photo:hover {
	transform: scale(1.05);
	box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1),
		0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Carousel row animations */
@keyframes scrollRight {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-50%);
	}
}

@keyframes scrollLeft {
	0% {
		transform: translateX(-50%);
	}
	100% {
		transform: translateX(0);
	}
}

.scroll-right {
	animation: scrollRight 500s linear infinite;
}

.scroll-left {
	animation: scrollLeft 500s linear infinite;
}

.carousel-row:hover .scroll-right,
.carousel-row:hover .scroll-left {
	animation-play-state: paused;
}

/* Gradient animation */
@keyframes gradientShift {
	0%,
	100% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
}

.animate-gradient {
	background-size: 200% 200%;
	animation: gradientShift 8s ease infinite;
}

/* Hero background fade animation */
@keyframes heroBgFade {
	0% {
		opacity: 0;
	}
	100% {
		opacity: 0.3;
	}
}

.hero-bg-fade {
	animation: heroBgFade 1.5s ease-in forwards;
}

/* Hero fade to white at bottom */
.hero-fade-overlay::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 40%;
	background: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0),
		rgba(255, 255, 255, 1)
	);
	pointer-events: none;
	z-index: 2;
}

@media (max-width: 1023px) {
	.hero-fade-overlay::after {
		height: 35%;
	}
}

/* Fade in up animation */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.fade-in-up {
	animation: fadeInUp 0.8s ease-out forwards;
}

/* Smooth hover lift effect */
.hover-lift {
	transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hover-lift:hover {
	transform: translateY(-8px) scale(1.02);
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Button hover effects */
.btn-primary {
	position: relative;
	overflow: hidden;
	transition: all 0.3s ease;
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 20px -10px rgba(37, 99, 235, 0.5);
}

.btn-primary::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	transform: translate(-50%, -50%);
	transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
	width: 300px;
	height: 300px;
}

/* Parallax effect */
.parallax-slow {
	transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Card shine effect */
.card-shine {
	position: relative;
	overflow: hidden;
}

.card-shine::after {
	content: '';
	position: absolute;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: linear-gradient(
		45deg,
		transparent 30%,
		rgba(255, 255, 255, 0.1) 50%,
		transparent 70%
	);
	transform: translateX(-100%);
	transition: transform 0.8s;
}

.card-shine:hover::after {
	transform: translateX(100%);
}

/* Stagger animation delay */
.stagger-1 {
	animation-delay: 0.1s;
}
.stagger-2 {
	animation-delay: 0.2s;
}
.stagger-3 {
	animation-delay: 0.3s;
}
.stagger-4 {
	animation-delay: 0.4s;
}
.stagger-5 {
	animation-delay: 0.5s;
}
.stagger-6 {
	animation-delay: 0.6s;
}

/* Navigation link underline effect */
.nav-link::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 0;
	width: 0;
	height: 2px;
	background: linear-gradient(to right, #2563eb, #06b6d4);
	transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
	width: 100%;
}

/* Smooth backdrop blur */
.backdrop-blur-elegant {
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	background: rgba(255, 255, 255, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Glow shadow effect */
.shadow-glow {
	box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
	transition: box-shadow 0.3s ease;
}

.shadow-glow:hover {
	box-shadow: 0 0 25px rgba(37, 99, 235, 0.5);
}

/* Floating animation */
@keyframes float {
	0%,
	100% {
		transform: translateY(0px);
	}
	50% {
		transform: translateY(-10px);
	}
}

.float-animation {
	animation: float 3s ease-in-out infinite;
}

/* Pulse glow effect */
@keyframes pulseGlow {
	0%,
	100% {
		box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
	}
	50% {
		box-shadow: 0 0 40px rgba(37, 99, 235, 0.6);
	}
}

.pulse-glow {
	animation: pulseGlow 2s ease-in-out infinite;
}

/* Mobile Navigation Styles */
.mobile-menu-button {
	display: none;
}
.mobile-menu {
	display: none;
}

@media (max-width: 768px) {
	.mobile-menu-button {
		display: block;
	}

	.desktop-menu {
		display: none !important;
	}

	.mobile-menu {
		position: fixed;
		top: 72px;
		left: 0;
		right: 0;
		display: block;
		background: white;
		box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
		transform: translateY(-100%);
		opacity: 0;
		transition: transform 0.3s ease, opacity 0.3s ease;
		pointer-events: none;
		max-height: calc(100vh - 72px);
		overflow-y: auto;
	}

	.mobile-menu.open {
		transform: translateY(0);
		opacity: 1;
		pointer-events: all;
	}

	.mobile-menu li {
		border-bottom: 1px solid #f0f0f0;
	}

	.mobile-menu a {
		display: block;
		padding: 1rem 1.5rem;
	}

	/* Carousel mobile optimizations */
	.carousel-photo {
		min-width: 120px;
		width: 120px;
		height: 180px;
	}

	/* Reduce card padding on mobile */
	section > div > div > div[class*='p-8'] {
		padding: 1.25rem !important;
	}

	section > div > div > div[class*='p-6'] {
		padding: 1rem !important;
	}

	/* Reduce text margins on mobile */
	.text-center.mb-16 {
		margin-bottom: 2rem !important;
	}

	/* Compact hero image on mobile */
	img[class*='h-[600px]'] {
		height: 400px !important;
	}

	/* Reduce large font sizes slightly on mobile */
	h1 {
		line-height: 1.2 !important;
	}

	/* Compact stats and features */
	.grid.gap-8 {
		gap: 1rem !important;
	}

	.grid.gap-6 {
		gap: 0.75rem !important;
	}

	/* Reduce excessive bottom margins */
	.mb-8 {
		margin-bottom: 1.5rem !important;
	}

	.mb-6 {
		margin-bottom: 1rem !important;
	}

	.mb-4 {
		margin-bottom: 0.75rem !important;
	}

	/* Inline emoji with title on mobile */
	@media (max-width: 768px) {
		/* Make emoji icons smaller on mobile */
		.w-12.h-12 {
			width: 2rem !important;
			height: 2rem !important;
			margin-bottom: 0 !important;
		}

		.w-14.h-14 {
			width: 2.5rem !important;
			height: 2.5rem !important;
			margin-bottom: 0 !important;
		}

		/* Create inline layout for emoji + title */
		.p-8.bg-gradient-to-br,
		.p-8.rounded-2xl {
			display: flex;
			flex-wrap: wrap;
			align-items: flex-start;
			gap: 0.5rem;
		}

		.p-8.bg-gradient-to-br > .w-12,
		.p-8.bg-gradient-to-br > .w-14,
		.p-8.rounded-2xl > .w-12,
		.p-8.rounded-2xl > .w-14 {
			flex-shrink: 0;
		}

		.p-8.bg-gradient-to-br > h3,
		.p-8.rounded-2xl > h3 {
			flex: 1;
			min-width: 0;
			margin-bottom: 0.75rem !important;
			margin-top: 0.25rem;
		}

		.p-8.bg-gradient-to-br > ul,
		.p-8.rounded-2xl > ul,
		.p-8.bg-gradient-to-br > p,
		.p-8.rounded-2xl > p {
			flex-basis: 100%;
		}
	}

	/* Further mobile condensing */
	h2 {
		font-size: 1.75rem !important;
		line-height: 1.3 !important;
	}

	h3 {
		font-size: 1.25rem !important;
	}

	p {
		font-size: 0.9rem !important;
	}

	/* Reduce section title margins */
	.text-center > h2 {
		margin-bottom: 0.5rem !important;
	}

	/* Tighten up grids */
	.space-y-6 > * + * {
		margin-top: 1rem !important;
	}

	.space-y-4 > * + * {
		margin-top: 0.75rem !important;
	}

	.practice-number {
		display: none;
	}

	footer {
		padding-top: 2.5rem;
		padding-bottom: 2.5rem;
	}

	.footer-grid {
		gap: 1.5rem;
	}

	.footer-hide-mobile {
		display: none;
	}

	.footer-meta {
		width: 100%;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.25rem;
	}

	.footer-meta span,
	.footer-meta a {
		display: none;
	}

	.footer-note {
		text-align: left !important;
		font-size: 0.7rem !important;
	}

	/* Mobile Swipeable Card System */
	.mobile-card-container {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		gap: 1rem;
		padding: 0 1rem 1.5rem;
	}

	.mobile-card-container::-webkit-scrollbar {
		display: none;
	}

	.mobile-card {
		flex: 0 0 85%;
		scroll-snap-align: start;
	}

	.mobile-card-dots {
		display: flex;
		justify-content: center;
		gap: 0.5rem;
		margin-top: 1rem;
	}

	.mobile-card-dot {
		width: 8px;
		height: 8px;
		border-radius: 50%;
		background: #cbd5e1;
		transition: all 0.3s ease;
	}

	.mobile-card-dot.active {
		background: #2563eb;
		width: 24px;
		border-radius: 4px;
	}

	/* Further condense mobile content */
	section {
		padding-top: 2rem !important;
		padding-bottom: 2rem !important;
	}

	.text-center.mb-16,
	.text-center.mb-12 {
		margin-bottom: 1.5rem !important;
	}

	h1 {
		font-size: 2rem !important;
		margin-bottom: 1rem !important;
	}

	h2 {
		font-size: 1.5rem !important;
		line-height: 1.3 !important;
		margin-bottom: 0.75rem !important;
	}

	h3 {
		font-size: 1.1rem !important;
		margin-bottom: 0.5rem !important;
	}

	p {
		font-size: 0.875rem !important;
		line-height: 1.5 !important;
		margin-bottom: 0.75rem !important;
	}

	li {
		font-size: 0.875rem !important;
	}

	/* Hide less critical sections on mobile */
	.mobile-hide-text {
		display: none !important;
	}

	/* Compact buttons */
	.btn-primary,
	a[class*='btn'],
	button {
		padding: 0.625rem 1.25rem !important;
		font-size: 0.875rem !important;
	}

	/* Tighter spacing everywhere */
	.space-y-6 > * + *,
	.space-y-8 > * + * {
		margin-top: 0.75rem !important;
	}

	.space-y-4 > * + * {
		margin-top: 0.5rem !important;
	}

	.gap-8,
	.gap-6 {
		gap: 0.75rem !important;
	}

	.gap-4 {
		gap: 0.5rem !important;
	}

	/* Reduce padding in cards */
	[class*='p-8'],
	[class*='p-10'] {
		padding: 1rem !important;
	}

	[class*='p-6'] {
		padding: 0.875rem !important;
	}

	/* Compact stats */
	.grid.grid-cols-3 {
		gap: 0.5rem !important;
	}

	.grid.grid-cols-3 > div {
		padding: 0.625rem !important;
	}

	/* Make service/expertise grids swipeable on mobile */
	#services .grid,
	#expertise .grid,
	#approach .grid {
		display: flex !important;
		flex-wrap: nowrap !important;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		gap: 1rem;
		padding-bottom: 1rem;
	}

	#services .grid::-webkit-scrollbar,
	#expertise .grid::-webkit-scrollbar,
	#approach .grid::-webkit-scrollbar {
		display: none;
	}

	#services .grid > div,
	#expertise .grid > div,
	#approach .grid > div {
		flex: 0 0 85%;
		scroll-snap-align: start;
	}

	/* Compact hero stats */
	.grid.grid-cols-3.gap-4 {
		grid-template-columns: repeat(3, 1fr);
		gap: 0.375rem !important;
	}

	.grid.grid-cols-3.gap-4 > div {
		padding: 0.5rem !important;
	}

	.grid.grid-cols-3.gap-4 .font-display {
		font-size: 1.5rem !important;
	}

	.grid.grid-cols-3.gap-4 .text-xs {
		font-size: 0.625rem !important;
	}

	/* Removed mobile gradient fade on `.lg:hidden .card-shine` to keep
	   experience images visually consistent across breakpoints. */

	/* Engagement model mobile fixes */
	.engagement-tag-text {
		display: none !important;
	}

	.engagement-title-mobile {
		display: block !important;
	}

	.engagement-title-desktop {
		display: none !important;
	}

	.engagement-pill {
		padding: 0.5rem 1rem !important;
		font-size: 0.875rem !important;
	}
}

/* Desktop: Reset grid layouts */
@media (min-width: 769px) {
	#services .grid,
	#expertise .grid,
	#approach .grid {
		display: grid !important;
		overflow-x: visible !important;
		scroll-snap-type: none !important;
		flex-wrap: wrap !important;
	}

	#services .grid > div,
	#expertise .grid > div,
	#approach .grid > div {
		flex: none !important;
		scroll-snap-align: none !important;
	}

	.mobile-card-dots {
		display: none !important;
	}
}
