/* Homepage Custom Styles */

/* Prevent horizontal scroll from elements bleeding off-screen */
html,
body {
	overflow-x: hidden;
}

/* Hero Section - Scrolls with page, positioned behind header */
.hero-section {
	position: relative;
	z-index: 1;
}

/* Typography Fallbacks - until custom fonts are loaded */
.font-pscript {
	font-family: "P Script Regular", "Brush Script MT", cursive;
	font-style: italic;
}

.font-operetta {
	font-family: "operetta-12", "Playfair Display", Georgia, "Times New Roman",
		serif;
	font-weight: 700;
}

.font-fieldgothic {
	font-family: "field-gothic-xxcondensed", sans-serif;
	font-weight: 800;
	font-style: normal;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

/* Hero Section Typography */
.hero-typography h1 {
	line-height: 1.1;
}

.hero-typography .font-pscript {
	font-size: clamp(3rem, 8vw, 6rem);
	margin-bottom: 1rem;
}

.hero-typography .font-fieldgothic {
	font-size: clamp(2.5rem, 7vw, 5rem);
	line-height: 0.9;
}

.hero-typography .font-operetta {
	font-size: clamp(2rem, 6vw, 4rem);
	margin-top: 0.5rem;
}

/* Services Carousel Interactive Styles */
.services-carousel {
	position: relative;
}

/* Desktop layout */
@media (min-width: 1024px) {
	.services-carousel__layout {
		display: grid;
		grid-template-columns: 5fr 7fr;
		grid-template-rows: auto auto;
		gap: 2rem 4rem;
	}

	.services-carousel__visual {
		grid-column: 1;
		grid-row: 1 / 3;
		order: unset !important;
	}

	.services-carousel__header-intro {
		grid-column: 2;
		grid-row: 1;
		order: unset !important;
		width: 100% !important;
	}

	.services-carousel__nav {
		grid-column: 2;
		grid-row: 2;
		order: unset !important;
		width: 100% !important;
		margin-left: 0 !important;
	}
}

.services-carousel__visual {
	position: relative;
}

.services-carousel__photo-wrapper {
	position: relative;
}

/* Stacked photos for fade transition */
.services-carousel__photo {
	position: absolute;
	inset: 0;
}

.services-carousel__photo:first-child {
	position: relative;
}

.services-carousel__photo img {
	transition: opacity 0.3s ease;
}

/* Photo color overlays */
.services-carousel__photo::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	mix-blend-mode: multiply;
	pointer-events: none;
}

.overlay-none::after {
	background-color: transparent;
}

.overlay-pearl::after {
	background-color: rgba(232, 227, 211, 0.4);
}

.overlay-sky::after {
	background-color: rgba(197, 224, 220, 0.5);
}

/* Photo wrapper - ensure perfect circle */
.services-carousel__photo-wrapper {
	width: 75vw;
	height: 75vw;
	max-width: 320px;
	max-height: 320px;
	border-radius: 50%;
}

.services-carousel__photo {
	aspect-ratio: 1 / 1;
}

/* Chili badge positioning and sizing */
.services-carousel__badge {
	position: absolute;
	width: 50vw;
	height: 50vw;
	max-width: 200px;
	max-height: 200px;
	bottom: -3rem;
	right: -2rem;
	transform: none;
}

@media (min-width: 768px) {
	.services-carousel__photo-wrapper {
		width: 360px;
		height: 360px;
		max-width: none;
		max-height: none;
	}
	.services-carousel__badge {
		width: 220px;
		height: 220px;
		max-width: none;
		max-height: none;
		bottom: -4rem;
		right: -2rem;
		transform: none;
	}
}

@media (min-width: 1024px) {
	.services-carousel__photo-wrapper {
		width: 420px;
		height: 420px;
	}
	.services-carousel__badge {
		width: 260px;
		height: 260px;
		bottom: -12rem;
		right: 0rem;
		transform: none;
	}
}

@media (min-width: 1280px) {
	.services-carousel__photo-wrapper {
		width: 480px;
		height: 480px;
	}
	.services-carousel__badge {
		width: 300px;
		height: 300px;
		bottom: -12rem;
		right: 0rem;
		transform: none;
	}
}

/* Mobile/tablet carousel styles */
@media (max-width: 1023px) {
	.services-carousel__nav-btn {
		pointer-events: auto;
		cursor: pointer;
	}

	/* Keep transitions for badge content */
	.services-carousel__badge-content {
		transition: opacity 0.5s ease;
	}
}

/* Badge positioning now handled above with sizes */

/* Badge content stacking */
.services-carousel__badge-content {
	position: relative;
}

.services-carousel__badge-content.opacity-0 {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* Services Navigation */
.services-carousel__nav ul {
	list-style: none;
}

.services-carousel__nav-btn {
	background: none;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	padding: 0.25rem 0;
	font-family: "Recht", sans-serif;
}

/* Active state - Recht Semi Bold, Chili color */
.service-item.active .services-carousel__nav-btn {
	color: #e54b2a !important;
	font-weight: 600 !important;
}

/* Inactive state - Recht Medium, Steel color */
.service-item:not(.active) .services-carousel__nav-btn {
	color: #bebab0;
	font-weight: 500;
}

.service-item:not(.active) .services-carousel__nav-btn:hover {
	color: #e54b2a;
	font-weight: 600;
}

/* Desktop nav items */
@media (min-width: 1024px) {
	.services-carousel__nav-btn {
		letter-spacing: -0.02em;
	}
}

/* Legacy support */
.team-photo-container {
	position: relative;
}

.team-photo-container img {
	transition: opacity 0.3s ease;
}

.service-number-circle {
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	z-index: 20;
}

.services-nav {
	list-style: none;
}

.service-item {
	position: relative;
}

.service-item button {
	position: relative;
	background: none;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	padding: 0.25rem 0;
}

/* Mobile service items */
@media (max-width: 1023px) {
	.service-item button {
		font-size: 1.25rem;
		padding: 0.5rem 0;
	}
}

/* Background color variations */
.bg-sky-100 {
	background-color: #e6f4f3;
}

.bg-pearl-100 {
	background-color: #fbfbf6;
}

/* Testimonial Transitions */
.testimonial-slide {
	opacity: 0;
	transition: opacity 0.5s ease;
}

.testimonial-slide.active {
	opacity: 1;
}

/* Scroll Animations */
[data-animate] {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animate-in {
	opacity: 1;
	transform: translateY(0);
}

/* Stagger animations for multiple elements */
[data-animate-delay="1"] {
	transition-delay: 0.1s;
}
[data-animate-delay="2"] {
	transition-delay: 0.2s;
}
[data-animate-delay="3"] {
	transition-delay: 0.3s;
}
[data-animate-delay="4"] {
	transition-delay: 0.4s;
}

/* Aspect Ratio Utilities */
.aspect-w-16 {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
}

.aspect-w-4 {
	position: relative;
	padding-bottom: 75%; /* 4:3 */
}

.aspect-w-16 > *,
.aspect-w-4 > * {
	position: absolute;
	height: 100%;
	width: 100%;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
}

/* Category Cards - Expanding Interaction */
.category-cards {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.category-card {
	display: block;
	overflow: hidden;
	transition: flex 0.4s ease;
}

.category-card__header {
	display: flex;
	align-items: center;
}

.category-card__title {
	flex-shrink: 0;
}

.category-card__description {
	display: block !important;
	opacity: 1;
	transition: opacity 0.3s ease;
	max-width: 220px;
	color: #3b3636;
}

.category-card__image-wrapper {
	position: relative;
	overflow: hidden;
}

.category-card__image {
	will-change: transform;
	transition: transform 0.5s ease;
}

/* Desktop: Expanding behavior */
@media (min-width: 1024px) {
	.category-cards {
		flex-direction: row;
		gap: 1rem;
		align-items: flex-start;
	}

	/* Default: all cards equal, descriptions hidden */
	.category-card {
		flex: 1;
	}

	/* Fixed height header to ensure alignment */
	.category-card__header {
		height: 60px;
		overflow: hidden;
	}

	/* Keep header images at fixed size, clip when card shrinks */
	.category-card__header img {
		width: 65%;
		flex-shrink: 0;
	}

	.category-card__description {
		opacity: 0;
	}

	/* Image wrapper has fixed height */
	.category-card__image-wrapper {
		aspect-ratio: auto;
		height: 500px;
	}

	.category-card__image {
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
	}

	/* The Work expanded by default */
	.category-card--work {
		flex: 2;
	}

	.category-card--work .category-card__description {
		opacity: 1;
	}

	/* On container hover: collapse all first */
	.category-cards:hover .category-card {
		flex: 1;
	}

	.category-cards:hover .category-card .category-card__description {
		opacity: 0;
	}

	/* Then expand the hovered card */
	.category-cards:hover .category-card:hover {
		flex: 2;
	}

	.category-cards:hover .category-card:hover .category-card__description {
		opacity: 1;
	}

	/* Hide mobile overlay on desktop */
	.category-card__overlay {
		display: none !important;
	}
}

/* Mobile/Tablet: Chili overlay on tap */
@media (max-width: 1023px) {
	.category-card__description {
		max-width: 200px;
		opacity: 1 !important;
	}

	.category-card__overlay {
		opacity: 0;
		background-color: rgba(241, 86, 35, 0.9);
		transition: opacity 0.3s ease;
	}

	.category-card__overlay h4 {
		opacity: 0;
		transition: opacity 0.3s ease;
	}

	.category-card:hover .category-card__overlay,
	.category-card:active .category-card__overlay {
		opacity: 1;
	}

	.category-card:hover .category-card__overlay h4,
	.category-card:active .category-card__overlay h4 {
		opacity: 1;
	}
}

/* Team Member Cards */
.team-member {
	cursor: pointer;
}

.team-member img {
	transition: transform 0.3s ease;
}

.team-member:hover img {
	transform: scale(1.1);
}

/* Team Member Photo Color Overlays */
.team-member__photo {
	position: relative;
}

.team-member__photo::after {
	content: "";
	position: absolute;
	inset: 0;
	mix-blend-mode: multiply;
	pointer-events: none;
	z-index: 10;
	transition: opacity 0.3s ease;
}

/* Desktop: rounded overlay */
@media (min-width: 768px) {
	.team-member__photo::after {
		border-radius: 9999px;
	}
}

/* Variant 1: No overlay (grayscale only) */
.team-member--variant-1 .team-member__photo::after,
.team-member--variant-1::after {
	background-color: transparent;
}

/* Variant 2: Pearl overlay */
.team-member--variant-2 .team-member__photo::after,
.team-member--variant-2::after {
	background-color: rgba(232, 227, 211, 0.4);
}

/* Variant 3: Sky overlay */
.team-member--variant-3 .team-member__photo::after,
.team-member--variant-3::after {
	background-color: rgba(197, 224, 220, 0.5);
}

/* Hide overlay on hover (when chili overlay shows) */
.group:hover .team-member__photo::after {
	opacity: 0;
}

/* Mobile: Prevent image from disappearing on touch/hover */
@media (max-width: 767px) {
	.team-member__photo img {
		opacity: 1 !important;
	}
}

/* CTA Decorative Elements */
.cta-illustration > div {
	animation: float 6s ease-in-out infinite;
}

.cta-illustration > div:last-child {
	animation-delay: 3s;
}

@keyframes float {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-20px);
	}
}

/* Video Section */
.video-section iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
	.hero-typography {
		text-align: center;
	}

	.services-carousel {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.service-slide {
		width: 80%;
		flex: 0 0 80%;
	}

	.carousel-dots {
		display: none;
	}
}

@media (min-width: 768px) {
	.services-carousel .carousel-track {
		display: flex;
	}
}

/* Values Section */
.values-section h3 {
	text-transform: capitalize !important;
	letter-spacing: 0.03em;
}

/* Performance: Lazy Loading */
img[loading="lazy"] {
	background: linear-gradient(
		to right,
		#f0f0f0 0%,
		#f8f8f8 50%,
		#f0f0f0 100%
	);
	background-size: 200% 100%;
	animation: loading 1.5s infinite;
}

img[loading="lazy"].loaded {
	animation: none;
	background: none;
}

@keyframes loading {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

/* Button hover effects - exclude badge */
a.rounded-full,
button.rounded-full {
	transition: all 0.3s ease;
}

/* Prevent badge from transitioning position */
.services-carousel__badge {
	transition: none;
}

a.rounded-full:hover,
button.rounded-full:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Page loaded animations */
.homepage-loaded .hero-section > * {
	animation: fadeInUp 0.8s ease-out;
}

.homepage-loaded .intro-section {
	animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

/* Print styles */
@media print {
	.services-carousel,
	.testimonials-slider,
	.carousel-dots {
		display: none;
	}

	.service-slide,
	.testimonial-slide {
		display: block !important;
		page-break-inside: avoid;
	}
}

/* Mobile Footer Nav - Above Footer */
.mobile-footer-nav a,
.mobile-footer-nav .menu-item a {
	color: #fbfbf6 !important; /* Pearl/white */
	font-family: "Recht", sans-serif;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 0.875rem;
}

.mobile-footer-nav a:hover,
.mobile-footer-nav .menu-item a:hover {
	color: #fbfbf6 !important;
	opacity: 0.8;
}

/* Mobile Two-Tap Interaction - Category Cards & Team Members */
@media (max-width: 767px) {
	/* Hide category card overlay on mobile - click goes directly to link */
	.category-card__overlay {
		display: none !important;
	}

	/* Team member overlay - controlled by JS */
	.team-member-overlay {
		pointer-events: none;
	}

	.team-member-overlay.mobile-active {
		opacity: 1 !important;
		pointer-events: auto;
	}

	/* Disable hover states on mobile - JS handles taps */
	.category-card:hover .category-card__overlay,
	.category-card:active .category-card__overlay {
		opacity: 0;
	}

	.group:hover .team-member-overlay,
	.group:active .team-member-overlay {
		opacity: 0;
	}
}
