/*
Theme Name: Composphere VFX
Theme URI: https://composphere.vfx
Author: Composphere
Description: Pixel-perfect cinematic homepage from Stitch — Composphere VFX | Cinematic Digital Experience.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: composphere-vfx
*/

/* --------------------------------------------------------------------------
   Base — matches Stitch screen exactly
   -------------------------------------------------------------------------- */

body.composphere-frontend {
	background-color: #0a0a0a;
	overflow-x: hidden;
}

html {
	overflow-x: hidden;
}

.material-symbols-outlined {
	font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
	vertical-align: middle;
}

.glass-panel {
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	background: rgba(13, 21, 22, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.glow-cyan {
	box-shadow: 0 0 30px rgba(0, 229, 255, 0.15);
}

.glow-purple {
	box-shadow: 0 0 30px rgba(96, 1, 209, 0.15);
}

.marquee {
	animation: composphere-marquee 30s linear infinite;
}

@keyframes composphere-marquee {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-50%);
	}
}

.text-gradient {
	background: linear-gradient(90deg, #c3f5ff, #d2bbff);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.reveal-up {
	opacity: 0;
	transform: translateY(30px);
	transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.active {
	opacity: 1;
	transform: translateY(0);
}

.scanline {
	background: linear-gradient(to bottom, transparent, #00e5ff 50%, transparent);
	opacity: 0.1;
	height: 2px;
	position: absolute;
	width: 100%;
	animation: composphere-scan 4s linear infinite;
}

@keyframes composphere-scan {
	0% {
		top: 0;
	}
	100% {
		top: 100%;
	}
}

/* FAQ summary reset */
details summary::-webkit-details-marker {
	display: none;
}

details summary {
	list-style: none;
}

/* Before/after slider handle rotation for unfold icon */
#slider-handle .material-symbols-outlined {
	transform: rotate(90deg);
}

/* Smooth scroll */
html {
	scroll-behavior: smooth;
}

/* --------------------------------------------------------------------------
   Hero — FrameBid-style particle field
   -------------------------------------------------------------------------- */

.hero-vignette {
	background:
		radial-gradient(ellipse at 30% 40%, rgba(0, 229, 255, 0.07) 0%, transparent 45%),
		radial-gradient(ellipse at 70% 60%, rgba(96, 1, 209, 0.08) 0%, transparent 50%),
		radial-gradient(ellipse at center, transparent 15%, rgba(10, 10, 10, 0.3) 70%, rgba(10, 10, 10, 0.8) 100%);
	pointer-events: none;
	z-index: 2;
}

#hero-particles {
	z-index: 1;
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	#hero-particles {
		display: none;
	}
}

/* --------------------------------------------------------------------------
   Portfolio poster lightbox
   -------------------------------------------------------------------------- */

.portfolio-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
}

.portfolio-lightbox[hidden] {
	display: none !important;
}

.portfolio-lightbox__backdrop {
	position: absolute;
	inset: 0;
	border: 0;
	background: rgba(5, 8, 22, 0.88);
	backdrop-filter: blur(10px);
	cursor: pointer;
}

.portfolio-lightbox__dialog {
	position: relative;
	z-index: 1;
	width: min(1100px, 100%);
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.portfolio-lightbox__image {
	display: block;
	width: 100%;
	max-height: calc(90vh - 4rem);
	object-fit: contain;
	border-radius: 0.75rem;
	box-shadow: 0 0 60px rgba(0, 229, 255, 0.12);
}

.portfolio-lightbox__title {
	font-family: "Bodoni Moda", serif;
	font-size: 1.25rem;
	color: #c3f5ff;
	letter-spacing: 0.02em;
	text-align: center;
}

.portfolio-lightbox__close {
	position: absolute;
	top: -0.5rem;
	right: -0.25rem;
	z-index: 2;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 9999px;
	background: rgba(13, 21, 22, 0.85);
	color: #c3f5ff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.portfolio-lightbox__close:hover {
	transform: scale(1.06);
	border-color: rgba(0, 229, 255, 0.35);
}

body.lightbox-open {
	overflow: hidden;
}

/* Mobile nav toggle */
.composphere-nav-toggle {
	display: none;
	background: transparent;
	border: 0;
	color: #c3f5ff;
	cursor: pointer;
	padding: 0.25rem;
}

@media (max-width: 767px) {
	.composphere-nav-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.composphere-nav-links.is-open {
		display: flex !important;
		flex-direction: column;
		position: absolute;
		top: calc(100% + 0.75rem);
		left: 0;
		right: 0;
		padding: 1.5rem;
		border-radius: 1rem;
		background: rgba(13, 21, 22, 0.95);
		backdrop-filter: blur(24px);
		border: 1px solid rgba(255, 255, 255, 0.05);
		gap: 1rem;
	}
}

/* Services sample carousels */
.service-carousel {
	position: relative;
	width: 100%;
}

.service-carousel__viewport {
	overflow: hidden;
	width: 100%;
	border-radius: 1rem;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.06);
	touch-action: pan-y;
	-webkit-user-select: none;
	user-select: none;
	cursor: grab;
}

.service-carousel__viewport:active {
	cursor: grabbing;
}

.service-carousel__track {
	display: flex;
	flex-wrap: nowrap;
	width: max-content;
	max-width: none;
	transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

.service-carousel__slide {
	position: relative;
	flex: 0 0 auto;
	width: 100%;
	min-width: 0;
	aspect-ratio: 16 / 9;
	margin: 0;
	overflow: hidden;
	background: #0a1014;
	box-sizing: border-box;
}

.service-carousel__slide img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.service-carousel__caption {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	padding: 1.5rem;
	background: linear-gradient(to top, rgba(5, 8, 22, 0.9), transparent);
	pointer-events: none;
}

.service-carousel__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin-top: 1.25rem;
}

.service-carousel__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 9999px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(13, 21, 22, 0.7);
	color: #c3f5ff;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.service-carousel__btn:hover {
	border-color: rgba(0, 229, 255, 0.45);
	color: #00e5ff;
	transform: scale(1.05);
}

.service-carousel__dots {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.service-carousel__dot {
	width: 0.55rem;
	height: 0.55rem;
	padding: 0;
	border: 0;
	border-radius: 9999px;
	background: rgba(195, 245, 255, 0.28);
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease, width 0.2s ease;
}

.service-carousel__dot.is-active {
	width: 1.35rem;
	background: #00e5ff;
}

@media (max-width: 767px) {
	.service-carousel__caption {
		padding: 1rem;
	}

	.service-carousel__controls {
		margin-top: 0.85rem;
		gap: 0.75rem;
		position: relative;
		z-index: 5;
	}

	.service-carousel__btn {
		touch-action: manipulation;
	}

	.service-carousel__dot {
		width: 0.7rem;
		height: 0.7rem;
		touch-action: manipulation;
	}

	.service-carousel__dot.is-active {
		width: 1.25rem;
	}
}

/* Frame Gallery 3D coverflow */
.frame-gallery-carousel {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1.5rem 0 2.5rem;
	width: 100%;
   /*max-width: 1100px;*/
	margin-inline: auto;
}

.frame-gallery-carousel__stage {
	position: relative;
	flex: 1;
	min-width: 0;
	height: clamp(420px, 58vw, 560px);
	perspective: 1600px;
	perspective-origin: 50% 50%;
	transform-style: preserve-3d;
	overflow: visible;
	touch-action: pan-y;
}

.frame-gallery-carousel__slide {
	position: absolute;
	top: 50%;
	left: 50%;
	width: min(440px, 52vw);
	aspect-ratio: 6 / 4;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0.75rem;
	overflow: hidden;
	cursor: pointer;
	background: #0a1014;
	transform-origin: center center;
	transform-style: preserve-3d;
	transform: translate(-50%, -50%);
	opacity: 0;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
	transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.45s ease,
		box-shadow 0.45s ease,
		filter 0.45s ease;
	filter: brightness(0.88);
	-webkit-tap-highlight-color: transparent;
}

.frame-gallery-carousel__slide.is-active {
	cursor: zoom-in;
	opacity: 1;
	filter: brightness(1);
	box-shadow: 0 28px 70px rgba(0, 229, 255, 0.2), 0 18px 40px rgba(0, 0, 0, 0.55);
	z-index: 100 !important;
}

.frame-gallery-carousel__slide.is-hidden {
	opacity: 0 !important;
	pointer-events: none;
	visibility: hidden;
}

.frame-gallery-carousel__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}

.frame-gallery-carousel__caption {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	padding: 1.25rem;
	text-align: left;
	background: linear-gradient(to top, rgba(5, 8, 22, 0.92), transparent);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.frame-gallery-carousel__slide.is-active .frame-gallery-carousel__caption {
	opacity: 1;
	transform: translateY(0);
}

.frame-gallery-carousel__nav {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border: 0;
	background: transparent;
	color: #00e5ff;
	cursor: pointer;
	z-index: 20;
	transition: transform 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.frame-gallery-carousel__nav:hover {
	transform: scale(1.12);
	color: #7af0ff;
}

.frame-gallery-carousel__nav .material-symbols-outlined {
	font-size: 2.5rem;
	font-variation-settings: 'wght' 300;
}

@media (max-width: 767px) {
	.frame-gallery-carousel {
		display: block;
		gap: 0;
		max-width: 100%;
		padding: 0.25rem 0 1.25rem;
		margin-inline: 0;
		overflow: visible;
	}

	.frame-gallery-carousel__stage {
		width: 100%;
		height: clamp(320px, 78vw, 420px);
		/* Never clip the stage — overflow:hidden breaks 3D + side taps */
		overflow: visible;
		perspective: 900px;
	}

	.frame-gallery-carousel__slide {
		width: min(220px, 58vw);
	}

	.frame-gallery-carousel__caption {
		padding: 0.85rem 1rem;
	}

	.frame-gallery-carousel__nav {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		width: 2.75rem;
		height: 2.75rem;
		border-radius: 999px;
		background: rgba(13, 21, 22, 0.75);
		border: 1px solid rgba(0, 229, 255, 0.25);
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
		z-index: 30;
	}

	.frame-gallery-carousel__nav:hover {
		transform: translateY(-50%) scale(1.06);
	}

	.frame-gallery-carousel__nav--prev {
		left: 0;
	}

	.frame-gallery-carousel__nav--next {
		right: 0;
	}

	.frame-gallery-carousel__nav .material-symbols-outlined {
		font-size: 1.85rem;
	}
}

/* --------------------------------------------------------------------------
   Site-wide mobile layout — spacing, padding, type, alignment
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
	html,
	body.composphere-frontend {
		overflow-x: hidden;
		max-width: 100vw;
	}

	body.composphere-frontend main,
	body.composphere-frontend section,
	body.composphere-frontend header {
		max-width: 100%;
	}

	/* Nav */
	body.composphere-frontend > nav {
		top: 0.75rem;
		width: calc(100% - 1.5rem);
		padding: 0.55rem 0.85rem !important;
		gap: 0.5rem;
	}

	body.composphere-frontend > nav img.h-14,
	body.composphere-frontend > nav img.h-9 {
		height: 2.25rem;
	}

	body.composphere-frontend > nav .h-8,
	body.composphere-frontend > nav .h-6 {
		height: 1.65rem;
	}

	body.composphere-frontend > nav .flex.items-center.gap-3,
	body.composphere-frontend > nav .flex.items-center.gap-2 {
		gap: 0.5rem;
		min-width: 0;
	}

	/* Spacing tokens — all pages */
	body.composphere-frontend .py-section-gap {
		padding-top: 3.5rem !important;
		padding-bottom: 3.5rem !important;
	}

	body.composphere-frontend .pb-section-gap {
		padding-bottom: 3.5rem !important;
	}

	body.composphere-frontend .px-margin-desktop {
		padding-left: 1.25rem !important;
		padding-right: 1.25rem !important;
	}

	body.composphere-frontend .px-margin-mobile {
		padding-left: 1.25rem !important;
		padding-right: 1.25rem !important;
	}

	body.composphere-frontend .mb-16,
	body.composphere-frontend .mb-20,
	body.composphere-frontend .mb-12 {
		margin-bottom: 1.75rem !important;
	}

	body.composphere-frontend .mb-10 {
		margin-bottom: 1.5rem !important;
	}

	body.composphere-frontend .gap-20 {
		gap: 1.75rem !important;
	}

	body.composphere-frontend .gap-16 {
		gap: 1rem !important;
	}

	body.composphere-frontend .gap-24 {
		gap: 2.5rem !important;
	}

	body.composphere-frontend .space-y-20 > :not([hidden]) ~ :not([hidden]) {
		margin-top: 3rem !important;
	}

	/* Type scale — all pages */
	body.composphere-frontend .text-headline-lg {
		font-size: 1.75rem !important;
		line-height: 2.15rem !important;
	}

	body.composphere-frontend .text-display-lg {
		font-size: 2rem !important;
		line-height: 2.4rem !important;
		letter-spacing: -0.01em !important;
	}

	body.composphere-frontend .text-headline-lg-mobile {
		font-size: 1.65rem !important;
		line-height: 2.05rem !important;
	}

	body.composphere-frontend .text-title-md {
		font-size: 1.05rem !important;
		line-height: 1.45rem !important;
	}

	body.composphere-frontend .text-body-lg {
		font-size: 0.95rem !important;
		line-height: 1.55rem !important;
	}

	body.composphere-frontend .tracking-\[0\.4em\] {
		letter-spacing: 0.18em !important;
	}

	body.composphere-frontend .tracking-\[0\.25em\] {
		letter-spacing: 0.14em !important;
	}

	/* Inner page heroes */
	body.composphere-frontend main > header.relative {
		min-height: auto;
		padding-top: 7rem !important;
		padding-bottom: 2.5rem !important;
	}

	body.composphere-frontend main > header .tracking-\[0\.4em\] {
		margin-bottom: 0.85rem !important;
	}

	body.composphere-frontend main > header .flex.flex-wrap {
		gap: 0.75rem !important;
	}

	body.composphere-frontend main > header a.px-8,
	body.composphere-frontend main > header a.py-3 {
		padding-left: 1.25rem !important;
		padding-right: 1.25rem !important;
		padding-top: 0.7rem !important;
		padding-bottom: 0.7rem !important;
	}

	/* Homepage hero */
	#hero {
		min-height: 100svh;
		height: auto;
		padding: 6.5rem 0 4.5rem;
		box-sizing: border-box;
	}

	#hero .z-10 {
		width: 100%;
		padding-inline: 1.25rem;
	}

	#hero .flex.flex-wrap {
		gap: 1rem 1.25rem !important;
	}

	#hero .flex.flex-wrap > div {
		flex: 1 1 28%;
		min-width: 5.5rem;
	}

	#hero .absolute.bottom-12 {
		bottom: 1.25rem;
	}

	/* Cards / panels */
	body.composphere-frontend .glass-panel.p-10,
	body.composphere-frontend .glass-panel.p-12,
	body.composphere-frontend .glass-panel.p-8 {
		padding: 1.25rem !important;
	}

	body.composphere-frontend .p-12 {
		padding: 1.25rem !important;
	}

	body.composphere-frontend #services h3.whitespace-nowrap {
		white-space: normal !important;
		font-size: 1.5rem !important;
		line-height: 1.75rem !important;
	}

	body.composphere-frontend #services .bottom-8 {
		bottom: 1.25rem;
		left: 1.25rem;
		right: 1.25rem;
	}

	body.composphere-frontend .h-\[500px\],
	body.composphere-frontend .h-\[280px\] {
		height: 260px !important;
	}

	body.composphere-frontend .h-\[280px\] p {
		font-size: 0.85rem;
		line-height: 1.35rem;
	}

	/* Team captions visible on touch */
	body.composphere-frontend #team .translate-y-full,
	body.composphere-frontend section .group .translate-y-full {
		transform: translateY(0) !important;
	}

	body.composphere-frontend section .group .bg-black\/80 {
		padding: 0.85rem 1rem !important;
	}

	/* CTA contact buttons */
	body.composphere-frontend #contact .glass-panel.px-10 {
		padding-left: 1.15rem !important;
		padding-right: 1.15rem !important;
		width: 100%;
		justify-content: flex-start;
	}

	body.composphere-frontend #contact .max-w-3xl {
		width: 100%;
	}

	body.composphere-frontend #contact .font-label-sm {
		word-break: break-word;
	}

	/* FAQ */
	body.composphere-frontend details summary {
		padding: 1rem !important;
		align-items: flex-start;
		gap: 0.75rem;
	}

	body.composphere-frontend details summary .text-title-md {
		font-size: 1rem !important;
		line-height: 1.4rem !important;
		padding-right: 0.5rem;
		text-align: left;
	}

	body.composphere-frontend details .px-6 {
		padding-left: 1rem !important;
		padding-right: 1rem !important;
	}

	/* Portfolio */
	body.composphere-frontend #portfolio-play-btn .w-20 {
		width: 3.5rem;
		height: 3.5rem;
	}

	body.composphere-frontend .portfolio-item .p-6 {
		padding: 1rem !important;
	}

	/* Services sticky jump nav */
	body.composphere-frontend #service-list {
		top: 4.25rem;
		padding-top: 0.75rem !important;
		padding-bottom: 0.75rem !important;
	}

	body.composphere-frontend #service-list a {
		padding-left: 0.85rem !important;
		padding-right: 0.85rem !important;
		padding-top: 0.4rem !important;
		padding-bottom: 0.4rem !important;
		font-size: 0.65rem;
		letter-spacing: 0.08em;
	}

	body.composphere-frontend #service-detail .py-20 {
		padding-top: 2.5rem !important;
		padding-bottom: 2.5rem !important;
	}

	body.composphere-frontend #service-detail .text-\[4rem\] {
		font-size: 3rem !important;
	}

	body.composphere-frontend #service-detail h2.text-headline-lg {
		font-size: 1.85rem !important;
		line-height: 2.15rem !important;
		margin-bottom: 1.25rem !important;
	}

	/* Contact form */
	body.composphere-frontend #contact-form .glass-panel,
	body.composphere-frontend #contact-page .glass-panel.p-8 {
		padding: 1.25rem !important;
	}

	body.composphere-frontend #contact-page input,
	body.composphere-frontend #contact-page select,
	body.composphere-frontend #contact-page textarea {
		font-size: 16px; /* prevent iOS zoom */
	}

	/* Marquee */
	body.composphere-frontend .marquee .text-headline-lg,
	body.composphere-frontend .marquee .text-headline-lg-mobile {
		font-size: 1.35rem !important;
		line-height: 1.6rem !important;
	}

	/* Decorative blurs that cause overflow */
	body.composphere-frontend #about .absolute.-bottom-10,
	body.composphere-frontend #about-story .absolute.-bottom-10 {
		display: none;
	}

	/* Footer */
	body.composphere-frontend footer {
		padding-left: 1.25rem !important;
		padding-right: 1.25rem !important;
		padding-top: 3rem !important;
		padding-bottom: 3rem !important;
	}

	body.composphere-frontend footer .mt-20 {
		margin-top: 2.5rem !important;
	}

	body.composphere-frontend footer .mb-12 {
		margin-bottom: 1.75rem !important;
	}

	body.composphere-frontend footer .flex.justify-between {
		flex-direction: column;
		gap: 0.75rem;
		text-align: left;
	}

	body.composphere-frontend footer .tracking-\[0\.2em\] {
		letter-spacing: 0.1em !important;
	}
}
