﻿/* MaxGreenVerse */

/* --- 主視覺 --- */

.hero-area {
	position: relative;
}

.hero-area .scroll-down {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	bottom: -1rem;
	width: 6rem;
	z-index: 1;
	animation: float 2s ease-in-out infinite;
}

@keyframes float {
	0%,
	100% {
		transform: translateX(-50%) translateY(0);
	}
	50% {
		transform: translateX(-50%) translateY(-1rem);
	}
}

@media (max-width: 62rem) {
	.hero-area .scroll-down {
		width: 4rem;
	}
}

.hero-area .scroll-down:hover {
	filter: drop-shadow(0 0 12px var(--color-glow));
}

/* --- 計畫介紹 --- */

/* 星雲裝飾層 */
.galaxy {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: linear-gradient(to top, var(--color-bg), #03122f);
	border-radius: 0 8rem 0 0;
}

/* 星雲光暈 - 主層 */
.galaxy::before {
	content: "";
	position: absolute;
	inset: -20%;
	z-index: -1;
	pointer-events: none;
	filter: blur(60px);
	background:
		radial-gradient(ellipse 55% 45% at 85% 10%, rgba(80, 20, 220, 0.7) 0%, transparent 60%),
		radial-gradient(ellipse 45% 35% at 8% 80%, rgba(3, 215, 244, 0.45) 0%, transparent 55%),
		radial-gradient(ellipse 40% 30% at 50% 45%, rgba(20, 80, 200, 0.5) 0%, transparent 65%),
		/* 底部銜接光暈 */ radial-gradient(ellipse 80% 35% at 50% 100%, rgba(63, 29, 177, 0.5) 0%, transparent 60%);
	animation: galaxyNebulaPrimary 14s ease-in-out infinite alternate;
}

/* 星雲光暈 - 副層 */
.galaxy::after {
	content: "";
	position: absolute;
	inset: -20%;
	z-index: -1;
	pointer-events: none;
	filter: blur(80px);
	background:
		radial-gradient(ellipse 50% 40% at 15% 5%, rgba(150, 60, 255, 0.5) 0%, transparent 55%),
		radial-gradient(ellipse 40% 35% at 75% 90%, rgba(3, 215, 244, 0.4) 0%, transparent 55%),
		radial-gradient(ellipse 35% 25% at 60% 60%, rgba(100, 20, 180, 0.35) 0%, transparent 60%);
	animation: galaxyNebulaSecondary 18s ease-in-out infinite alternate-reverse;
}

@keyframes galaxyNebulaPrimary {
	0% {
		opacity: 0.5;
		transform: scale(1) rotate(0deg);
	}
	50% {
		opacity: 0.9;
		transform: scale(1.06) rotate(1deg);
	}
	100% {
		opacity: 0.7;
		transform: scale(1.03) rotate(-1deg);
	}
}

@keyframes galaxyNebulaSecondary {
	0% {
		opacity: 0.4;
		transform: scale(1.04) rotate(0deg);
	}
	50% {
		opacity: 0.8;
		transform: scale(1) rotate(-1.5deg);
	}
	100% {
		opacity: 0.6;
		transform: scale(1.07) rotate(1deg);
	}
}

.intro-section {
	overflow: hidden;
}

.intro-text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.intro-text > img {
	width: 35vw;
	transform: rotate(-31deg);
	margin-bottom: -10vw;
	pointer-events: none;
}

@media (max-width: 48rem) {
	.intro-text > img {
		width: 65vw;
	}
}

/* override BS */
.intro-text > .title {
	font-weight: bold;
}

.intro-text > .description {
	color: var(--color-white);
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7); /* 增加文字可讀性 */
	white-space: pre-line;
}

/* --- 關鍵理念 --- */

.keyword > img {
	width: 100%;
	transition: all 0.3s ease;
}

@media (min-width: 48rem) {
	.keyword > img {
		max-width: 15rem;
	}
}

.keyword:hover > img {
	transform: scale(1.05);
	filter: drop-shadow(0 2px 12px var(--color-glow));
}

/* --- 成功案例 --- */

.case-section .section-heading > h2 {
	color: var(--color-white);
}

.case-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.card-item1 {
	background-image: url("/image/home/case_001.webp");
}

.card-item2 {
	background-image: url("/image/home/case_002.webp");
}

.card-item3 {
	background-image: url("/image/home/case_003.webp");
}

.card-item4 {
	background-image: url("/image/home/case_004.webp");
}

.card-item5 {
	background-image: url("/image/home/case_005.webp");
}

.card-item6 {
	background-image: url("/image/home/case_006.webp");
}

.case-cards > [class^="card-item"] {
	position: relative;
	flex: 1 1 30%;
	padding: 2rem;
	background-size: cover;
	background-position: center;
	min-height: 16rem;
}

@media (max-width: 48rem) {
	.case-cards > [class^="card-item"] {
		flex-basis: 50%;
	}
}

/* 圖片遮罩 */
.case-cards > [class^="card-item"]::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.3);
}

.card-inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 1.5rem;
	width: 100%;
	height: 100%;
	padding: 1rem;
}

/* 內容遮罩 */
.card-inner::before {
	content: "";
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.4);
	border-radius: 0.5rem;
	z-index: -1;
	transition:
		inset 0.3s ease,
		border-radius 0.3s ease;
}

.case-cards > [class^="card-item"]:hover .card-inner::before {
	inset: -2rem;
	border-radius: 0;
}

.card-inner > .title {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.4rem;
}

.card-inner > .title > .badge {
	align-self: flex-end; /* 只佔自身文字寬度 */
	background: rgba(3, 215, 244, 0.12);
	color: var(--color-sub);
	border: 1px solid rgba(3, 215, 244, 0.3);
	font-size: 0.8rem;
	font-weight: bold;
}

.card-inner > .body {
	font-weight: 900;
	color: var(--color-sub);
	text-align: center;
	transition: transform 0.3s ease;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.card-inner:hover > .body {
	transform: scale(1.1);
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7); /* 增加文字可讀性 */
}

.card-inner > .benefit-list {
	margin-left: 1.25rem;
	list-style-type: disc;
	color: var(--color-white);
}

/* --- 產品簡介 --- */

.product-section {
	position: relative;
	background: linear-gradient(to bottom, var(--color-bg), #03122f);
	padding-top: 5rem;
	overflow: hidden;
}

/* 頂部銜接 galaxy 區塊的星雲光暈 */
.product-section::before {
	content: "";
	position: absolute;
	inset: -20% -20% auto;
	height: 55%;
	pointer-events: none;
	filter: blur(70px);
	background:
		radial-gradient(ellipse 75% 55% at 50% 0%, rgba(63, 29, 177, 0.5) 0%, transparent 65%),
		radial-gradient(ellipse 45% 40% at 10% 20%, rgba(3, 215, 244, 0.22) 0%, transparent 55%),
		radial-gradient(ellipse 40% 35% at 85% 25%, rgba(120, 40, 240, 0.28) 0%, transparent 55%);
	animation: galaxyNebulaPrimary 14s ease-in-out infinite alternate;
}

/* 區塊標題 */
.product-section .section-header {
	text-align: center;
	margin-bottom: 5rem;
	color: var(--color-white);
}

.product-section .section-title {
	font-size: 2.5rem;
	font-weight: bold;
	background: var(--color-gradient-1);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.product-section .section-subtitle {
	font-size: 1.2rem;
	color: rgba(255, 255, 255, 0.65);
	margin-top: 0.75rem;
}

.product-section .section-divider {
	display: block;
	width: 4rem;
	height: 3px;
	margin: 1.5rem auto 0;
	background: var(--color-gradient-1);
	border-radius: 2px;
}

/* 產品列表 */
.product-list {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 5rem;
}

/* 垂直連接線 */
.product-list::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 0;
	bottom: 0;
	width: 1px;
	background: linear-gradient(
		to bottom,
		transparent 0%,
		rgba(3, 215, 244, 0.3) 10%,
		rgba(3, 215, 244, 0.15) 50%,
		rgba(3, 215, 244, 0.3) 90%,
		transparent 100%
	);
	transform: translateX(-50%);
}

.product-list > .list-item {
	position: relative;
	display: flex;
	justify-content: space-evenly;
	align-items: center;
	gap: 6rem;
}

.product-list > .list-item:nth-child(even) {
	flex-direction: row-reverse;
}

/* 圖片容器 */
.list-item .image-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 25rem;
	animation: float-image 2s ease-in-out infinite;
}

.list-item .image-wrapper > img {
	transition: all 0.5s ease;
}

/* 產品圖片光暈 */
.list-item:hover .image-wrapper > img {
	filter: drop-shadow(0 0 12px rgba(0, 184, 255, 0.6)) drop-shadow(0 0 24px rgba(0, 184, 255, 0.45))
		drop-shadow(0 0 36px rgba(0, 184, 255, 0.25));
}

@keyframes float-image {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-1rem);
	}
}

/* 玻璃卡片 */
.glass-card {
	padding: 2.5rem 2.5rem 2.5rem 3rem;
	max-width: 32rem;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 1.5rem;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(22px);
}

.glass-card .card-content > .content {
	white-space: pre-line;
}

/* 裝飾編號 */
.glass-card > .item-number {
	position: absolute;
	top: -0.5rem;
	right: 1rem;
	font-size: 5rem;
	font-weight: 900;
	line-height: 1;
	background: linear-gradient(180deg, rgba(3, 215, 244, 0.2) 0%, rgba(63, 29, 177, 0.08) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	pointer-events: none;
	user-select: none;
}

.glass-card > .card-content {
	position: relative;
	z-index: 2;
	color: var(--color-white);
}

.glass-card > .card-content > .title {
	color: var(--color-sub);
	font-size: 1.5rem;
	font-weight: bold;
	margin-bottom: 0.5rem;
}

/* 標題下方漸層分隔線 */
.glass-card > .card-content > .title-divider {
	display: block;
	width: 3rem;
	height: 2px;
	margin-bottom: 1rem;
	background: var(--color-gradient-1);
	border-radius: 2px;
}

.glass-card > .card-content > .content {
	line-height: 1.8;
	color: rgba(255, 255, 255, 0.8);
	margin-bottom: 1.25rem;
}

/* 特色標籤 */
.glass-card .tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
}

.glass-card .tag-list > .tag {
	padding: 0.25rem 0.75rem;
	font-size: 0.8rem;
	color: var(--color-sub);
	background: rgba(3, 215, 244, 0.1);
	border: 1px solid rgba(3, 215, 244, 0.25);
	border-radius: 2rem;
	white-space: nowrap;
}

/* 裝飾插圖（section 層級絕對定位） */
.deco-illustration {
	position: absolute;
	z-index: 0;
	pointer-events: none;
	filter: drop-shadow(0 0 18px rgba(3, 215, 244, 0.3));
}

.deco-illustration.-rocket {
	width: 10rem;
	top: 35%;
	right: 1.5rem;
	animation: floatSpacecraft 6s ease-in-out infinite;
}

.deco-illustration.-airship {
	width: 8rem;
	top: 65%;
	left: 2rem;
	animation: floatSpacecraft 5s ease-in-out infinite;
}

@keyframes floatSpacecraft {
	0%,
	100% {
		transform: translateY(0) rotate(-2deg);
	}
	50% {
		transform: translateY(-15px) rotate(2deg);
	}
}

/* RWD */
@media (max-width: 62rem) {
	.product-section {
		padding-top: 3rem;
	}

	.product-list::before {
		display: none;
	}

	.product-list > .list-item {
		flex-direction: column;
		gap: 1.5rem;
	}

	.product-list > .list-item:nth-child(even) {
		flex-direction: column;
	}

	.list-item .image-wrapper > img {
		width: 20rem;
	}

	.list-item .image-wrapper::before {
		width: 14rem;
		height: 14rem;
	}

	.glass-card {
		max-width: 100%;
		padding: 2rem 2rem 2rem 2.5rem;
	}

	.deco-illustration.-airship {
		width: 5rem;
		right: 0.5rem;
	}

	.deco-illustration.-rocket {
		width: 4rem;
		left: 0.5rem;
	}
}

/* --- 行動呼籲 --- */

.cta-section {
	position: relative;
	height: 60vh;
	background: url("/image/home/planet-surface.jpg") no-repeat top center / cover;
}

.cta-section .cta-button {
	position: absolute;
	top: 50%;
	left: 50%;
	translate: -50% -50%; /* 獨立於 transform，避免與動畫的 scale 衝突 */
	width: 15rem;
	height: 15rem;
}

.cta-section .cta-button::before,
.cta-section .cta-button::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid var(--color-glow);
	animation: cta-ripple 2.4s ease-in-out infinite backwards;
}

.cta-section .cta-button::after {
	animation-delay: 1.2s;
}

@keyframes cta-ripple {
	0% {
		transform: scale(0.5);
		opacity: 0;
	}
	15% {
		opacity: 0.8;
	}
	100% {
		transform: scale(1.5);
		opacity: 0;
	}
}

.cta-section .sub-title {
	position: absolute;
	top: 20%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	text-align: center;
	color: var(--color-sub);
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55); /* 增加文字可讀性 */
}

/* 滑鼠跟隨 tooltip */
.tooltip {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 3;
	padding: 0.5rem 1rem;
	background: rgba(10, 10, 15, 0.8);
	border: 1px solid rgba(10, 10, 15, 0.5);
	border-radius: 1rem;
	color: var(--color-lightGray);
	font-size: 0.9rem;
	font-weight: bold;
	backdrop-filter: blur(8px);
	white-space: nowrap;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
	opacity: 0;
	transition: opacity 0.2s ease;
	translate: -50% calc(-100% - 14px);
}

.tooltip.is-visible {
	opacity: 1;
}

/* --- 星點裝飾層 --- */

/* 星點容器 */
.stars {
	position: relative;
	overflow: hidden;
}

/* 由 JS 隨機產生的單顆星點 */
.star {
	position: absolute;
	border-radius: 50%;
	background: var(--color-white);
	opacity: 0.75;
	box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
	animation: twinkle 4s ease-in-out infinite;
	pointer-events: none; /* 讓星點不干擾滑鼠事件 */
}

@keyframes twinkle {
	0%,
	100% {
		opacity: 0.25;
		transform: scale(0.85);
	}
	50% {
		opacity: 1;
		transform: scale(1.5);
	}
}

/* --- CTA Modal --- */

.cta-modal-content {
	background-color: rgba(13, 17, 23, 0.75);
	backdrop-filter: blur(12px);
}
