/* =============================================
   漢元技研有限公司 — HanYuan GIKEN
   全站樣式表
   ============================================= */

/* ---------- CSS Custom Properties ---------- */
:root {
	--color-primary: #0a1628;
	--color-primary-light: #132040;
	--color-accent: #2563eb;
	--color-accent-hover: #1d4ed8;
	--color-accent-light: rgba(37, 99, 235, 0.12);
	--color-white: #ffffff;
	--color-light: #f1f5f9;
	--color-gray: #94a3b8;
	--color-dark: #1e293b;
	--color-text: #334155;
	--color-heading: #0f172a;
	--font-main: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
	--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
	--radius: 12px;
	--radius-sm: 8px;
	--transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	font-size: 16px;
}

body {
	font-family: var(--font-main);
	color: var(--color-text);
	line-height: 1.75;
	background: var(--color-white);
	overflow-x: hidden;
}

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

a {
	text-decoration: none;
	color: inherit;
	transition: var(--transition);
}

ul {
	list-style: none;
}

/* ---------- Container ---------- */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- Section Header ---------- */
.section-header {
	text-align: center;
	max-width: 720px;
	margin: 0 auto 56px;
}

.section-label {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-accent);
	margin-bottom: 12px;
}

.section-title {
	font-size: 2.25rem;
	font-weight: 700;
	color: var(--color-heading);
	line-height: 1.35;
	margin-bottom: 16px;
}

.section-desc {
	font-size: 1.05rem;
	color: var(--color-gray);
	line-height: 1.8;
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	padding: 20px 0;
	transition: var(--transition);
}

.navbar.scrolled {
	background: rgba(10, 22, 40, 0.95);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	padding: 12px 0;
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.nav-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.nav-logo {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.logo-zh {
	font-size: 1.25rem;
	font-weight: 900;
	color: var(--color-white);
	letter-spacing: 0.04em;
}

.logo-en {
	font-size: 0.7rem;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.6);
	letter-spacing: 0.08em;
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 8px;
}

.nav-links a {
	font-size: 0.9rem;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.8);
	padding: 8px 16px;
	border-radius: var(--radius-sm);
	transition: var(--transition);
}

.nav-links a:hover {
	color: var(--color-white);
	background: rgba(255, 255, 255, 0.1);
}

.nav-links a i {
	margin-right: 6px;
	font-size: 0.85rem;
}

.nav-cta {
	background: var(--color-accent) !important;
	color: var(--color-white) !important;
	padding: 10px 22px !important;
	border-radius: 50px !important;
	font-weight: 600 !important;
}

.nav-cta:hover {
	background: var(--color-accent-hover) !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

/* Mobile toggle */
.nav-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
}

.nav-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--color-white);
	border-radius: 2px;
	transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
	transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
	opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
	transform: rotate(-45deg) translate(5px, -5px);
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
}

.hero-bg {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #0a1628 0%, #132040 40%, #1a2a4a 100%);
	z-index: 0;
}

.hero-bg::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background:
		radial-gradient(ellipse 80% 60% at 70% 40%, rgba(37, 99, 235, 0.15) 0%, transparent 60%),
		radial-gradient(ellipse 60% 50% at 20% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 50%);
}

/* Subtle grid pattern */
.hero-bg::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
	background-size: 60px 60px;
	z-index: 1;
}

.hero-content {
	position: relative;
	z-index: 2;
	padding: 0 24px;
	max-width: 900px;
}

.hero-badge {
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--color-accent);
	border: 1px solid rgba(37, 99, 235, 0.3);
	padding: 8px 24px;
	border-radius: 50px;
	margin-bottom: 32px;
	background: rgba(37, 99, 235, 0.06);
}

.hero-title {
	font-size: 3.5rem;
	font-weight: 900;
	color: var(--color-white);
	line-height: 1.3;
	margin-bottom: 24px;
	letter-spacing: -0.01em;
}

.hero-title .highlight {
	color: var(--color-accent);
	position: relative;
}

.hero-subtitle {
	font-size: 1.15rem;
	color: rgba(255, 255, 255, 0.65);
	margin-bottom: 40px;
	font-weight: 300;
	letter-spacing: 0.05em;
}

.hero-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--color-white);
	background: var(--color-accent);
	padding: 16px 36px;
	border-radius: 50px;
	transition: var(--transition);
}

.hero-btn:hover {
	background: var(--color-accent-hover);
	transform: translateY(-2px);
	box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
}

.hero-btn i {
	transition: transform var(--transition);
}

.hero-btn:hover i {
	transform: translateX(4px);
}

.hero-scroll-indicator {
	position: absolute;
	bottom: 40px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	text-align: center;
	color: rgba(255, 255, 255, 0.4);
	font-size: 0.8rem;
	letter-spacing: 0.1em;
}

.scroll-line {
	width: 1px;
	height: 40px;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent);
	margin: 8px auto 0;
	animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.3; }
}

/* =============================================
   ABOUT SECTION
   ============================================= */
.about {
	padding: 100px 0;
	background: var(--color-white);
}

.about .section-title {
	font-size: 2rem;
}

/* =============================================
   SERVICES SECTION
   ============================================= */
.services {
	padding: 100px 0;
	background: var(--color-light);
}

.services-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

.service-card {
	background: var(--color-white);
	padding: 40px 32px;
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	transition: var(--transition);
	position: relative;
	overflow: hidden;
}

.service-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--color-accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--transition);
}

.service-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
	transform: scaleX(1);
}

.card-icon {
	width: 56px;
	height: 56px;
	border-radius: var(--radius-sm);
	background: var(--color-accent-light);
	color: var(--color-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.4rem;
	margin-bottom: 24px;
	transition: var(--transition);
}

.service-card:hover .card-icon {
	background: var(--color-accent);
	color: var(--color-white);
}

.card-title {
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--color-heading);
	margin-bottom: 12px;
}

.card-desc {
	font-size: 0.95rem;
	color: var(--color-gray);
	line-height: 1.7;
}

.card-line {
	width: 40px;
	height: 3px;
	background: var(--color-accent);
	border-radius: 2px;
	margin-top: 20px;
	opacity: 0.5;
	transition: var(--transition);
}

.service-card:hover .card-line {
	width: 60px;
	opacity: 1;
}

/* =============================================
   SHOWCASE SECTION
   ============================================= */
.showcase {
	padding: 100px 0;
	background: var(--color-white);
}

.showcase-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	align-items: center;
}

.showcase-text .section-label {
	text-align: left;
}

.showcase-text h2 {
	font-size: 2rem;
	font-weight: 700;
	color: var(--color-heading);
	line-height: 1.4;
	margin-bottom: 20px;
}

.showcase-text p {
	font-size: 1.05rem;
	color: var(--color-gray);
	line-height: 1.8;
}

.showcase-image {
	position: relative;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-lg);
}

.showcase-image img {
	width: 100%;
	height: 400px;
	object-fit: cover;
	display: block;
}

.image-badge {
	position: absolute;
	bottom: 24px;
	left: 24px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(8px);
	padding: 16px 24px;
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-md);
}

.badge-number {
	display: block;
	font-size: 1.75rem;
	font-weight: 900;
	color: var(--color-accent);
	line-height: 1;
}

.badge-label {
	font-size: 0.8rem;
	color: var(--color-gray);
	font-weight: 500;
}

/* =============================================
   STATS SECTION
   ============================================= */
.stats {
	padding: 80px 0;
	background: var(--color-primary);
	position: relative;
	overflow: hidden;
}

.stats::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background:
		radial-gradient(ellipse 80% 60% at 50% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 60%);
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 40px;
	position: relative;
	z-index: 1;
	text-align: center;
}

.stat-number {
	font-size: 2.5rem;
	font-weight: 900;
	color: var(--color-white);
	line-height: 1;
	margin-bottom: 8px;
}

.stat-label {
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.5);
	font-weight: 500;
	letter-spacing: 0.05em;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
	background: var(--color-primary);
	padding: 60px 0 0;
	color: rgba(255, 255, 255, 0.6);
}

.footer-content {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 60px;
	padding-bottom: 48px;
}

.footer-brand {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.footer-logo {
	font-size: 1.5rem;
	font-weight: 900;
	color: var(--color-white);
	letter-spacing: 0.04em;
}

.footer-brand p {
	font-size: 0.95rem;
}

.footer-tagline {
	font-size: 0.9rem !important;
	color: rgba(255, 255, 255, 0.4) !important;
	font-style: italic;
}

.footer-links h4 {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--color-white);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 20px;
}

.footer-links ul {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.footer-links a {
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.5);
	transition: var(--transition);
}

.footer-links a:hover {
	color: var(--color-accent);
	padding-left: 4px;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	padding: 24px 0;
	text-align: center;
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.3);
}

/* =============================================
   SCROLL ANIMATIONS
   ============================================= */
.animate-on-scroll {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
	opacity: 1;
	transform: translateY(0);
}

/* Staggered delays for service cards */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 1024px) {
	.services-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.showcase-inner {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.showcase-text {
		text-align: center;
	}

	.showcase-text .section-label {
		text-align: center;
	}

	.stats-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 32px;
	}

	.footer-content {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

@media (max-width: 768px) {
	.nav-toggle {
		display: flex;
	}

	.nav-links {
		position: fixed;
		top: 0;
		right: -100%;
		width: 280px;
		height: 100vh;
		background: var(--color-primary);
		flex-direction: column;
		padding: 80px 32px 32px;
		gap: 4px;
		transition: right 0.35s ease;
		box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
	}

	.nav-links.active {
		right: 0;
	}

	.nav-links a {
		width: 100%;
		padding: 12px 16px;
		font-size: 1rem;
	}

	.nav-cta {
		margin-top: 16px;
		text-align: center;
	}

	.hero-title {
		font-size: 2.2rem;
	}

	.hero-subtitle {
		font-size: 1rem;
	}

	.section-title {
		font-size: 1.75rem;
	}

	.services-grid {
		grid-template-columns: 1fr;
	}

	.showcase-image img {
		height: 280px;
	}

	.stat-number {
		font-size: 2rem;
	}

	.about,
	.services,
	.showcase {
		padding: 64px 0;
	}

	.stats {
		padding: 56px 0;
	}

	.hero-scroll-indicator {
		display: none;
	}
}

@media (max-width: 480px) {
	.hero-title {
		font-size: 1.8rem;
	}

	.hero-btn {
		padding: 14px 28px;
		font-size: 0.95rem;
	}

	.section-title {
		font-size: 1.5rem;
	}

	.service-card {
		padding: 28px 24px;
	}
}
