/**
 * AI Services Showcase – Frontend Styles
 */

/* ==========================================================================
   CSS Custom Properties & Typography
   ========================================================================== */

.aiss-showcase {
	--aiss-accent: #6b4eff;
	--aiss-accent-rgb: 107, 78, 255;
	--aiss-text: #1a1a2e;
	--aiss-text-muted: #6b7280;
	--aiss-bg: #f8f9fc;
	--aiss-card-bg: #ffffff;
	--aiss-border: #e5e7eb;
	--aiss-radius: 16px;
	--aiss-radius-sm: 12px;
	--aiss-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 4px 12px rgba(15, 23, 42, 0.04),
		0 12px 32px rgba(15, 23, 42, 0.06),
		0 24px 48px rgba(15, 23, 42, 0.04);
	--aiss-shadow-active:
		0 2px 4px rgba(15, 23, 42, 0.04),
		0 8px 20px rgba(15, 23, 42, 0.06),
		0 16px 40px rgba(15, 23, 42, 0.08);
	--aiss-ease: cubic-bezier(0.4, 0, 0.2, 1);
	--aiss-duration: 0.4s;
	--aiss-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--aiss-font-heading: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--aiss-gradient-start: var(--aiss-accent);
	--aiss-gradient-end: #4f46e5;

	font-family: var(--aiss-font-body);
	color: var(--aiss-text);
	background: linear-gradient(180deg, #f8f9fc 0%, #eef0f8 100%);
	padding: 30px 24px 48px;
	border-radius: var(--aiss-radius);
	box-sizing: border-box;
	max-width: 1200px;
	margin: 0 auto;
	background: transparent !important;
}

.aiss-showcase *,
.aiss-showcase *::before,
.aiss-showcase *::after {
	box-sizing: border-box;
}

/* ==========================================================================
   Reusable Animation Classes
   ========================================================================== */

.aiss-reveal {
	opacity: 0;
	transform: translateY(20px);
	transition:
		opacity var(--aiss-duration) var(--aiss-ease),
		transform var(--aiss-duration) var(--aiss-ease);
	will-change: opacity, transform;
}

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

.aiss-reveal:nth-child(1) { transition-delay: 0ms; }
.aiss-reveal:nth-child(2) { transition-delay: 60ms; }
.aiss-reveal:nth-child(3) { transition-delay: 120ms; }
.aiss-reveal:nth-child(4) { transition-delay: 180ms; }
.aiss-reveal:nth-child(5) { transition-delay: 240ms; }
.aiss-reveal:nth-child(6) { transition-delay: 300ms; }

/* ==========================================================================
   Header
   ========================================================================== */

.aiss-header {
	text-align: center;
	margin-bottom: 48px;
}

.aiss-section-heading {
	font-family: var(--aiss-font-heading);
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	font-weight: 700;
	line-height: 1.25;
	color: var(--aiss-text);
	margin: 0;
}

.aiss-heading-highlight {
	background: linear-gradient(135deg, var(--aiss-accent) 0%, #8b6fff 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* ==========================================================================
   Body Layout
   ========================================================================== */

.aiss-showcase-body {
	display: grid;
	grid-template-columns: 340px 1fr;
	gap: 24px;
	align-items: start;
}

/* ==========================================================================
   Left Navigation Cards
   ========================================================================== */

.aiss-nav-track {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.aiss-nav-card {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	margin: 0;
	border: 1px solid #e8eaef;
	background: #ffffff;
	border-radius: 14px;
	cursor: pointer;
	text-align: left;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
	transition:
		box-shadow var(--aiss-duration) var(--aiss-ease),
		border-color var(--aiss-duration) var(--aiss-ease);
	font-family: var(--aiss-font-body);
	color: var(--aiss-text);
	overflow: hidden;
	user-select: none;
}

.aiss-nav-card:focus {
	outline: none;
}

.aiss-nav-card:focus-visible {
	box-shadow: 0 0 0 3px rgba(var(--aiss-accent-rgb), 0.2);
}

/* Left accent border – top-to-bottom fill via scaleY */
.aiss-nav-card-border {
	position: absolute;
	left: 0;
	top: 0;
	width: 5px;
	height: 100%;
	background: var(--aiss-accent);
	border-radius: 14px 0 0 14px;
	transform: scaleY(0);
	transform-origin: top center;
	transition: transform 0.45s var(--aiss-ease);
	will-change: transform;
	z-index: 3;
}

.aiss-nav-card.is-active .aiss-nav-card-border {
	transform: scaleY(1);
}

.aiss-nav-card-inner {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
}

.aiss-nav-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--aiss-accent);
	background: none;
	border: none;
}

/* Tint uploaded icons via CSS mask */
.aiss-nav-icon .aiss-icon-tinted {
	display: block;
	width: 22px;
	height: 22px;
	background-color: var(--aiss-accent);
	-webkit-mask-image: var(--aiss-icon-url);
	mask-image: var(--aiss-icon-url);
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}

.aiss-nav-text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.aiss-nav-label {
	display: block;
	font-family: var(--aiss-font-body);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--aiss-accent);
	line-height: 1.2;
}

.aiss-nav-title {
	display: block;
	font-family: var(--aiss-font-heading);
	font-size: 0.9375rem;
	font-weight: 600;
	color: #1a1a2e;
	line-height: 1.35;
}

.aiss-nav-arrow {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--aiss-accent);
	opacity: 0.3;
	transition: opacity var(--aiss-duration) var(--aiss-ease), transform var(--aiss-duration) var(--aiss-ease);
}

/* Active nav card */
.aiss-nav-card.is-active {
	box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
	border-color: transparent;
	background: #ffffff;
}

.aiss-nav-card.is-active .aiss-nav-arrow {
	opacity: 1;
}

/* ==========================================================================
   Right Content Panel
   ========================================================================== */

.aiss-content {
	position: relative;
	background: var(--aiss-card-bg);
	border-radius: var(--aiss-radius);
	box-shadow: var(--aiss-shadow);
	min-height: 380px;
	overflow: hidden;
	border: 1px solid rgba(15, 23, 42, 0.04);
    height:100%;
}

.aiss-content-slide {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	padding: 35px 44px 35px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	z-index: 0;
}

.aiss-content-slide.is-active {
	position: relative;
	top: auto;
	left: auto;
	right: auto;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	z-index: 2;
}

.aiss-content-slide.is-exiting {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	opacity: 0;
	z-index: 1;
	transition: opacity 0.35s var(--aiss-ease);
}

.aiss-slide-glow {
	position: absolute;
	top: -15%;
	right: -8%;
	width: 200px;
	height: 200px;
	background: var(--aiss-accent);
	opacity: 0.22;
	filter: blur(40px);
	pointer-events: none;
	z-index: 0;
}

.aiss-slide-body {
	position: relative;
	z-index: 2;
}

/* Background number – premium faded watermark */
.aiss-bg-number {
	position: absolute;
	top: 8px;
	right: 20px;
	pointer-events: none;
	user-select: none;
	z-index: 1;
	line-height: 1;
	overflow: visible;
}

.aiss-bg-number-text {
	display: block;
	font-family: var(--aiss-font-heading);
	font-size: clamp(7rem, 14vw, 11rem);
	font-weight: 700;
	line-height: 0.9;
	color: var(--aiss-accent);
	opacity: 0.08;
	-webkit-mask-image: linear-gradient(165deg, #000 0%, #000 35%, rgba(0, 0, 0, 0.4) 65%, transparent 90%);
	mask-image: linear-gradient(165deg, #000 0%, #000 35%, rgba(0, 0, 0, 0.4) 65%, transparent 90%);
}

.aiss-content-slide.is-active .aiss-bg-number-text {
	animation: aiss-bg-number-in 0.45s var(--aiss-ease) forwards;
}

@keyframes aiss-bg-number-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 0.08;
		transform: translateY(0);
	}
}

.aiss-content-icon {
	position: relative;
	z-index: 1;
	width: 64px;
	height: 64px;
	border-radius: 14px;
	background: linear-gradient(135deg, var(--aiss-gradient-start) 0%, var(--aiss-gradient-end) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 24px;
	color: #ffffff;
	box-shadow: 0 6px 20px rgba(var(--aiss-accent-rgb), 0.18);
}

.aiss-content-icon img {
	width: 32px;
	height: 32px;
	object-fit: contain;
	filter: brightness(0) invert(1);
}

.aiss-content-heading {
	font-family: var(--aiss-font-heading);
	font-size: clamp(1.375rem, 3vw, 1.75rem);
	font-weight: 700;
	color: var(--aiss-text);
	margin: 0 0 8px;
	line-height: 1.3;
}

.aiss-content-subtitle {
	font-family: var(--aiss-font-body);
	font-size: 0.9375rem;
	font-style: italic;
	font-weight: 500;
	color: var(--aiss-accent);
	margin: 0 0 20px;
	line-height: 1.5;
}

.aiss-content-description {
	font-family: var(--aiss-font-body);
	font-size: 0.9375rem;
	line-height: 1.75;
	color: var(--aiss-text-muted);
	margin-bottom: 28px;
}

.aiss-content-description p {
	margin: 0 0 12px;
}

.aiss-content-description p:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   Feature Tags
   ========================================================================== */

.aiss-feature-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0 0 4px;
}

.aiss-feature-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	background: var(--aiss-card-bg);
	border: 1px solid var(--aiss-border);
	border-radius: 100px;
	font-family: var(--aiss-font-body);
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--aiss-text);
	white-space: nowrap;
}

.aiss-feature-check {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	color: var(--aiss-accent);
	flex-shrink: 0;
}

/* ==========================================================================
   Progress Indicator
   ========================================================================== */

.aiss-progress {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 36px;
}

.aiss-progress-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 100px;
	background: #d1d5db;
	background-image: none;
	cursor: pointer;
	transition: width var(--aiss-duration) var(--aiss-ease), background var(--aiss-duration) var(--aiss-ease);
	font-size: 0;
	line-height: 0;
	font-family: var(--aiss-font-body);
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
	text-shadow: none;
}

.aiss-progress-dot:hover,
.aiss-progress-dot:focus,
.aiss-progress-dot:active {
	background-image: none;
	box-shadow: none;
	outline: none;
}

.aiss-progress-dot:focus {
	outline: none;
}

.aiss-progress-dot:focus-visible {
	box-shadow: 0 0 0 3px rgba(var(--aiss-accent-rgb), 0.25);
}

.aiss-progress-dot.is-active {
	width: 40px;
	background: var(--aiss-accent);
}

.aiss-progress-dot:hover:not(.is-active) {
	background: #9ca3af;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.aiss-empty-notice {
	padding: 16px;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 8px;
	color: #664d03;
	font-family: var(--aiss-font-body);
}

/* ==========================================================================
   Tablet (≤ 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
	.aiss-showcase {
		padding: 32px 20px 36px;
	}

	.aiss-showcase-body {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.aiss-nav {
		margin-bottom: 4px;
	}

	.aiss-nav-track {
		flex-direction: row;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		gap: 10px;
		padding: 4px 2px 12px;
		scrollbar-width: thin;
	}

	.aiss-nav-track::-webkit-scrollbar {
		height: 4px;
	}

	.aiss-nav-track::-webkit-scrollbar-thumb {
		background: #d1d5db;
		border-radius: 4px;
	}

	.aiss-nav-card {
		flex: 0 0 min(300px, 85vw);
		scroll-snap-align: start;
		scroll-snap-stop: always;
	}

	.aiss-content {
		min-height: 280px;
	}

	.aiss-content-slide {
		padding: 28px 24px 36px;
	}

	.aiss-content-description {
		margin-bottom: 22px;
	}

	.aiss-feature-tags {
		gap: 10px;
	}
}

/* ==========================================================================
   Mobile (≤ 640px)
   ========================================================================== */

@media (max-width: 640px) {
	.aiss-showcase {
		padding: 20px 12px 28px;
		border-radius: 12px;
	}

	.aiss-showcase-body {
		gap: 14px;
	}

	.aiss-nav-card {
		flex: 0 0 min(280px, 88vw);
	}

	.aiss-nav-card-inner {
		padding: 14px 16px;
		gap: 10px;
	}

	.aiss-nav-icon {
		width: auto;
		height: auto;
	}

	.aiss-nav-label {
		font-size: 0.625rem;
	}

	.aiss-nav-title {
		font-size: 0.875rem;
		line-height: 1.3;
	}

	.aiss-content {
		min-height: 0;
		border-radius: 14px;
	}

	.aiss-content-slide {
		padding: 22px 18px 30px;
	}

	.aiss-bg-number {
		top: 6px;
		right: 10px;
	}

	.aiss-bg-number-text {
		font-size: clamp(4.5rem, 22vw, 6.5rem);
		opacity: 0.09;
	}

	.aiss-content-icon {
		width: 52px;
		height: 52px;
		border-radius: 12px;
		margin-bottom: 16px;
	}

	.aiss-content-icon img {
		width: 26px;
		height: 26px;
	}

	.aiss-content-heading {
		font-size: 1.25rem;
		margin-bottom: 6px;
		padding-right: 48px;
	}

	.aiss-content-subtitle {
		font-size: 0.875rem;
		margin-bottom: 14px;
		line-height: 1.45;
	}

	.aiss-content-description {
		font-size: 0.875rem;
		line-height: 1.65;
		margin-bottom: 18px;
	}

	.aiss-feature-tags {
		gap: 8px;
		margin-top: 2px;
	}

	.aiss-feature-tag {
		padding: 8px 12px;
		font-size: 0.75rem;
		line-height: 1.35;
		white-space: normal;
		flex: 1 1 calc(50% - 4px);
		min-width: 0;
	}

	.aiss-feature-tag:last-child:nth-child(odd) {
		flex-basis: 100%;
	}

	.aiss-progress {
		margin-top: 20px;
		gap: 6px;
	}
}

/* ==========================================================================
   Small mobile (≤ 400px)
   ========================================================================== */

@media (max-width: 400px) {
	.aiss-showcase {
		padding: 16px 10px 24px;
	}

	.aiss-nav-card {
		flex: 0 0 92vw;
	}

	.aiss-content-slide {
		padding: 20px 16px 24px;
	}

	.aiss-content-heading {
		font-size: 1.125rem;
		padding-right: 36px;
	}

	.aiss-feature-tag {
		flex: 1 1 100%;
	}
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
	.aiss-reveal,
	.aiss-nav-card-border,
	.aiss-nav-arrow,
	.aiss-content-slide,
	.aiss-progress-dot,
	.aiss-bg-number-text {
		transition: none !important;
		animation: none !important;
	}

	.aiss-bg-number-text {
		opacity: 0.08;
		transform: none;
	}

	.aiss-reveal {
		opacity: 1;
		transform: none;
	}
}