/* ==========================================================================
   Fushang AI — Design Tokens & Base Styles
   ========================================================================== */

:root {
	/* Colors */
	--fa-bg: #f7f8fa;
	--fa-surface: #ffffff;
	--fa-text: #111318;
	--fa-text-secondary: #667085;
	--fa-border: #e6e8ec;
	--fa-accent: #2563eb;
	--fa-accent-2: #06b6d4;

	/* AI gradient (blue → cyan) */
	--fa-gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);

	/* Subtle radial glow */
	--fa-glow: rgba(37, 99, 235, 0.10);

	/* Radius */
	--fa-radius-card: 18px;
	--fa-radius-badge: 999px;
	--fa-radius-control: 8px;

	/* Layout */
	--fa-content-max: 1180px;
	--fa-header-height: 68px;

	/* Motion */
	--fa-transition: 180ms ease;
}

/* Resets */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	position: relative;
	margin: 0;
	background-color: var(--fa-bg);
	background-image:
		linear-gradient(rgba(17, 19, 24, 0.025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(17, 19, 24, 0.025) 1px, transparent 1px);
	background-size: 48px 48px;
	color: var(--fa-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
		"Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

/* ==========================================================================
   Background flowing light (AI ambience)
   ========================================================================== */

/* Soft flowing orbs — subtle neural / thought-flow imagery */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background:
		radial-gradient(circle at 12% 18%, rgba(37, 99, 235, 0.07), transparent 34%),
		radial-gradient(circle at 88% 30%, rgba(6, 182, 212, 0.06), transparent 32%),
		radial-gradient(circle at 30% 78%, rgba(99, 102, 241, 0.05), transparent 36%);
	animation: fa-orb-drift 40s ease-in-out infinite alternate;
}

/* Horizontal light pulse sweeping along the grid lines (data flow) */
body::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	/* Repeating horizontal lines + a horizontal bright band moving left-to-right */
	background:
		repeating-linear-gradient(
			to bottom,
			transparent 0px,
			transparent 47px,
			rgba(37, 99, 235, 0.05) 48px,
			transparent 49px
		),
		linear-gradient(
			90deg,
			transparent 0%,
			transparent 30%,
			rgba(37, 99, 235, 0.10) 50%,
			transparent 70%,
			transparent 100%
		);
	background-size: 100% 100%, 300% 100%;
	animation: fa-grid-pulse 14s linear infinite;
}

@keyframes fa-orb-drift {
	0% {
		transform: translate3d(0, 0, 0) scale(1);
	}
	50% {
		transform: translate3d(-2%, 2%, 0) scale(1.06);
	}
	100% {
		transform: translate3d(2%, -1%, 0) scale(1);
	}
}

/* Move the bright band horizontally, like data flowing along the grid */
@keyframes fa-grid-pulse {
	0% {
		background-position: 0 0, 0% 0;
	}
	100% {
		background-position: 0 0, 300% 0;
	}
}

/* Ensure content sits above the ambient layer */
.fa-header,
.fa-main,
.fa-footer {
	position: relative;
	z-index: 1;
}

a {
	color: inherit;
	text-decoration: none;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Layout container */
.fa-container {
	width: 100%;
	max-width: var(--fa-content-max);
	margin: 0 auto;
	padding: 0 24px;
}

/* Accessibility */
:focus-visible {
	outline: 2px solid var(--fa-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

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

	body::before,
	body::after {
		animation: none !important;
	}
}

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

.fa-header {
	height: var(--fa-header-height);
	background: var(--fa-surface);
	border-bottom: 1px solid var(--fa-border);
	display: flex;
	align-items: center;
}

.fa-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.fa-header__brand {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.01em;
	background: var(--fa-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.fa-header__brand-accent {
	color: var(--fa-accent);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.fa-footer {
	border-top: 1px solid var(--fa-border);
	background: var(--fa-surface);
	padding: 32px 0;
	margin-top: 0;
}

.fa-footer__inner {
	text-align: center;
}

.fa-footer__brand {
	font-weight: 700;
	font-size: 16px;
	margin: 0 0 8px;
	color: var(--fa-text);
}

.fa-footer__copyright {
	margin: 0 0 16px;
	color: var(--fa-text-secondary);
	font-size: 13px;
}

.fa-footer__beian {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 13px;
	color: var(--fa-text-secondary);
}

.fa-footer__beian a {
	color: var(--fa-text-secondary);
}

.fa-footer__beian a:hover {
	color: var(--fa-text);
}

.fa-footer__sep {
	color: var(--fa-border);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.fa-hero {
	position: relative;
	padding: 50px 0 0;
}

.fa-hero::before {
	content: "";
	position: absolute;
	top: -120px;
	left: -180px;
	width: 520px;
	height: 520px;
	background: radial-gradient(circle, var(--fa-glow) 0%, transparent 70%);
	pointer-events: none;
	z-index: 0;
}

.fa-hero .fa-container {
	position: relative;
	z-index: 1;
}

.fa-hero__title {
	font-size: 52px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	margin: 0 0 18px;
	max-width: 680px;
	background: var(--fa-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.fa-hero__subtitle {
	font-size: 17px;
	color: var(--fa-text-secondary);
	margin: 0;
}

/* ==========================================================================
   Applications
   ========================================================================== */

.fa-apps {
	padding: 56px 0 0;
}

.fa-apps__head {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 24px;
}

.fa-apps__title {
	font-size: 22px;
	font-weight: 700;
	margin: 0;
}

.fa-apps__en {
	font-size: 12px;
	letter-spacing: 0.08em;
	color: transparent;
	background: var(--fa-gradient);
	-webkit-background-clip: text;
	background-clip: text;
}

.fa-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	column-gap: 22px;
	row-gap: 22px;
}

/* ==========================================================================
   Product Card
   ========================================================================== */

.fa-card {
	position: relative;
	background: var(--fa-surface);
	border: 1px solid transparent;
	background-clip: padding-box;
	border-radius: var(--fa-radius-card);
	padding: 32px;
	min-height: 340px;
	display: flex;
	flex-direction: column;
	transition: transform var(--fa-transition), box-shadow var(--fa-transition);
}

.fa-card::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: var(--fa-radius-card);
	padding: 1px;
	background: linear-gradient(160deg, rgba(37, 99, 235, 0.35), rgba(230, 232, 236, 0.6), rgba(6, 182, 212, 0.25));
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	pointer-events: none;
}

.fa-card--clickable:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 32px rgba(37, 99, 235, 0.16), 0 4px 12px rgba(6, 182, 212, 0.08);
}

.fa-card--clickable:hover::before {
	background: linear-gradient(160deg, var(--fa-accent), var(--fa-accent-2));
}

.fa-card--clickable:focus-within {
	outline: 2px solid var(--fa-accent);
	outline-offset: 2px;
}

.fa-card__link {
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: var(--fa-radius-card);
}

.fa-card__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 28px;
}

.fa-card__icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	object-fit: cover;
	display: block;
	flex-shrink: 0;
	box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.10), 0 4px 12px rgba(37, 99, 235, 0.14);
}

.fa-card__icon--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--fa-gradient);
	color: #ffffff;
	font-weight: 700;
	font-size: 20px;
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.20);
}

.fa-badge {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.03em;
	padding: 3px 10px;
	border-radius: var(--fa-radius-badge);
}

.fa-badge--live {
	background: #e8f7ee;
	color: #1a7f4b;
}

.fa-badge--beta {
	background: #eef2fb;
	color: #2563eb;
}

.fa-badge--coming_soon {
	background: #f1f2f4;
	color: #667085;
}

.fa-card__name {
	font-size: 26px;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.25;
	margin: 0 0 8px;
	color: var(--fa-text);
	overflow-wrap: break-word;
}

.fa-card__subtitle {
	font-size: 14px;
	color: var(--fa-text-secondary);
	line-height: 1.4;
	margin: 0 0 20px;
}

.fa-card__desc {
	font-size: 15px;
	color: #3a3f47;
	line-height: 1.65;
	margin: 0;
	flex: 1;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.fa-card__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 28px;
}

.fa-card__tags {
	display: flex;
	gap: 8px;
}

.fa-card__tag {
	font-size: 13px;
	color: var(--fa-text-secondary);
}

.fa-card__tag + .fa-card__tag::before {
	content: "·";
	margin-right: 8px;
	color: var(--fa-border);
}

.fa-card__arrow {
	font-size: 18px;
	color: var(--fa-accent);
	transition: transform var(--fa-transition), color var(--fa-transition);
	flex-shrink: 0;
}

.fa-card__arrow--placeholder {
	opacity: 0;
}

.fa-card--clickable:hover .fa-card__arrow {
	transform: translate(3px, -3px);
	color: var(--fa-accent-2);
}

/* ==========================================================================
   NEXT PRODUCT Card
   ========================================================================== */

.fa-card--next {
	border-style: dashed;
	border-color: #d9dde3;
	background: #fafbfc;
	justify-content: center;
	align-items: center;
	text-align: center;
	min-height: 340px;
}

.fa-card-next__label {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	color: #b0b6bf;
}

.fa-card-next__hint {
	font-size: 14px;
	color: #c3c8cf;
	margin-top: 8px;
}

/* ==========================================================================
   Brand Statement
   ========================================================================== */

.fa-brand {
	position: relative;
	padding: 72px 0 96px;
	text-align: center;
	overflow: hidden;
}

.fa-brand::before {
	content: "";
	position: absolute;
	bottom: -220px;
	left: 50%;
	transform: translateX(-50%);
	width: 720px;
	height: 420px;
	background: radial-gradient(ellipse, var(--fa-glow) 0%, transparent 70%);
	pointer-events: none;
}

.fa-brand__title {
	font-size: 26px;
	font-weight: 700;
	margin: 0 0 12px;
	color: var(--fa-text);
}

.fa-brand__text {
	font-size: 16px;
	color: var(--fa-text-secondary);
	margin: 0;
}

/* ==========================================================================
   404
   ========================================================================== */

.fa-404 {
	padding-top: 80px;
	padding-bottom: 80px;
	text-align: center;
}

.fa-404__title {
	font-size: 56px;
	font-weight: 700;
	margin: 0 0 12px;
	letter-spacing: -0.02em;
}

.fa-404__text {
	color: var(--fa-text-secondary);
	margin: 0 0 24px;
}

.fa-404__link {
	display: inline-block;
	color: var(--fa-accent);
	font-weight: 600;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
	.fa-container {
		padding: 0 20px;
	}

	.fa-header {
		height: 62px;
	}

	.fa-hero {
		padding-top: 40px;
	}

	.fa-hero__title {
		font-size: 36px;
	}

	.fa-hero__subtitle {
		font-size: 15px;
	}

	.fa-apps {
		padding-top: 40px;
	}

	.fa-grid {
		grid-template-columns: 1fr;
		row-gap: 16px;
	}

	.fa-card {
		min-height: 300px;
	}

	.fa-card--next {
		min-height: 300px;
	}

	/* Hide the second NEXT PRODUCT placeholder on mobile */
	.fa-grid .fa-card--next + .fa-card--next {
		display: none;
	}

	.fa-brand {
		padding: 56px 0 72px;
	}
}
