/* =========================================================
   DoItWell.app v2 - 一頁式設計
   配色延續 v1：藍 #74BEE1 / 綠 #95D074 / 紅 #C71E32 / 黃 #FCFF77
   ========================================================= */

:root {
	--c-blue: #74BEE1;
	--c-blue-dark: #4FA0C7;
	--c-green: #95D074;
	--c-green-dark: #6CB04A;
	--c-red: #C71E32;
	--c-red-soft: #E45A6B;
	--c-yellow: #FCFF77;
	--c-bg: #F5F7FA;
	--c-bg-soft: #E2E4E7;
	--c-card: #FFFFFF;
	--c-text: #1B1F23;
	--c-text-soft: #4A5159;
	--c-text-mute: #98999C;
	--c-border: #E5E8EC;

	--shadow-sm: 0 2px 6px rgba(24, 27, 30, 0.06);
	--shadow-md: 0 8px 24px rgba(24, 27, 30, 0.08);
	--shadow-lg: 0 18px 50px rgba(24, 27, 30, 0.12);

	--radius-sm: 8px;
	--radius-md: 14px;
	--radius-lg: 22px;

	--font-zh: 'Noto Sans TC', '微軟正黑體', 'PingFang TC', sans-serif;
	--font-en: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
	--font-stack: var(--font-en), var(--font-zh);
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	padding: 0;
	background: var(--c-bg);
	color: var(--c-text);
	font-family: var(--font-stack);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

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

/* =========================================================
   頂部導覽
   ========================================================= */

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.25s ease, background 0.25s ease;
}

.site-header.scrolled {
	border-bottom-color: var(--c-border);
	background: rgba(255, 255, 255, 0.92);
}

.header-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 14px 28px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	color: var(--c-text);
}

.brand-logo {
	height: 32px;
	width: auto;
}

/* header 不顯示舊風格 logo 圖，改用 CSS 文字（保留 footer 與 hero 的 logo 用途） */
.site-header .brand-logo {
	display: none;
}

.brand-text {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: 0.3px;
	color: var(--c-text);
}

.brand-dot {
	color: var(--c-red);
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 22px;
}

.site-nav a,
.lang-toggle {
	font-size: 14px;
	color: var(--c-text-soft);
	font-weight: 500;
	transition: color 0.2s ease;
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px 8px;
	font-family: inherit;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.site-nav a:hover,
.lang-toggle:hover {
	color: var(--c-blue-dark);
}

/* 漢堡選單按鈕（預設隱藏，手機才顯示） */
.nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	margin-left: auto;
	z-index: 102;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--c-text);
	border-radius: 2px;
	transition: transform 0.25s ease, top 0.25s ease, background 0.25s ease;
}

.nav-toggle-icon {
	position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
	content: '';
	position: absolute;
	left: 0;
}

.nav-toggle-icon::before { top: -7px; }
.nav-toggle-icon::after  { top:  7px; }

.nav-toggle.is-open .nav-toggle-icon { background: transparent; }
.nav-toggle.is-open .nav-toggle-icon::before {
	top: 0;
	transform: rotate(45deg);
}
.nav-toggle.is-open .nav-toggle-icon::after {
	top: 0;
	transform: rotate(-45deg);
}

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

.hero {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 120px 24px 80px;
	overflow: hidden;
	background: linear-gradient(135deg, #EAF6FB 0%, #E9F5DA 50%, #FBE9EC 100%);
}

.hero-bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
}

.hero-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(80px);
	opacity: 0.55;
	animation: float 18s ease-in-out infinite;
}

.orb-blue {
	background: var(--c-blue);
	width: 480px;
	height: 480px;
	top: -120px;
	left: -100px;
	animation-delay: -2s;
}

.orb-green {
	background: var(--c-green);
	width: 420px;
	height: 420px;
	bottom: -120px;
	right: 5%;
	animation-delay: -8s;
}

.orb-red {
	background: var(--c-red-soft);
	width: 360px;
	height: 360px;
	top: 30%;
	right: -120px;
	animation-delay: -14s;
}

@keyframes float {
	0%, 100% { transform: translate(0, 0) scale(1); }
	33%      { transform: translate(40px, -30px) scale(1.05); }
	66%      { transform: translate(-30px, 40px) scale(0.95); }
}

.hero-content {
	position: relative;
	z-index: 2;
	text-align: center;
	max-width: 780px;
	margin: 0 auto;
}

.hero-logo {
	width: 96px;
	height: auto;
	margin: 0 auto 28px;
	filter: drop-shadow(0 8px 24px rgba(24, 27, 30, 0.12));
}

.hero-title {
	font-size: clamp(2rem, 5vw, 3.4rem);
	font-weight: 900;
	line-height: 1.2;
	margin: 0 0 16px;
	color: var(--c-text);
	letter-spacing: -0.5px;
	background: linear-gradient(120deg, var(--c-blue-dark), var(--c-green-dark) 50%, var(--c-red) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.hero-subtitle {
	font-size: clamp(1rem, 2vw, 1.2rem);
	color: var(--c-text-soft);
	margin: 0 0 36px;
	font-weight: 400;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	justify-content: center;
	margin-bottom: 56px;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 160px;
	padding: 14px 32px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 16px;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
	border: 2px solid transparent;
	cursor: pointer;
	font-family: inherit;
	text-align: center;
}

.btn-primary {
	background: linear-gradient(135deg, var(--c-blue), var(--c-blue-dark));
	color: #fff;
	box-shadow: 0 10px 28px rgba(116, 190, 225, 0.45);
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 36px rgba(116, 190, 225, 0.55);
}

.btn-ghost {
	background: rgba(255, 255, 255, 0.75);
	color: var(--c-text);
	border-color: rgba(24, 27, 30, 0.12);
}

.btn-ghost:hover {
	background: #fff;
	transform: translateY(-2px);
	box-shadow: var(--shadow-sm);
}

.hero-stats {
	display: flex;
	justify-content: center;
	gap: 32px;
	flex-wrap: wrap;
}

.hero-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 16px 24px;
	background: rgba(255, 255, 255, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.8);
	border-radius: var(--radius-md);
	min-width: 110px;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.hero-stat strong {
	font-size: 1.4rem;
	font-weight: 800;
	color: var(--c-text);
}

.hero-stat span {
	font-size: 0.85rem;
	color: var(--c-text-mute);
	letter-spacing: 0.5px;
}

.hero-scroll {
	position: absolute;
	bottom: 28px;
	left: 50%;
	transform: translateX(-50%);
	width: 28px;
	height: 44px;
	border: 2px solid rgba(24, 27, 30, 0.4);
	border-radius: 14px;
	display: flex;
	justify-content: center;
	padding-top: 6px;
}

.hero-scroll span {
	width: 4px;
	height: 8px;
	background: rgba(24, 27, 30, 0.6);
	border-radius: 2px;
	animation: scroll-dot 1.6s ease-in-out infinite;
}

@keyframes scroll-dot {
	0%   { transform: translateY(0); opacity: 0; }
	30%  { opacity: 1; }
	100% { transform: translateY(14px); opacity: 0; }
}

/* =========================================================
   Apps Section
   ========================================================= */

.apps-section {
	max-width: 1280px;
	margin: 0 auto;
	padding: 100px 28px 80px;
}

.section-head {
	text-align: center;
	margin-bottom: 56px;
}

.section-head h2 {
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	font-weight: 800;
	margin: 0 0 12px;
	color: var(--c-text);
}

.section-head p {
	color: var(--c-text-mute);
	font-size: 1rem;
	margin: 0;
}

.apps-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 26px;
}

/* =========================================================
   App Card
   ========================================================= */

.app-card {
	position: relative;
	background: var(--c-card);
	border-radius: var(--radius-lg);
	padding: 28px 26px 24px;
	box-shadow: var(--shadow-sm);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
	gap: 18px;
	overflow: hidden;
	border: 1px solid var(--c-border);
}

.app-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: var(--c-blue);
	transform-origin: left;
	transition: transform 0.3s ease;
}

.app-card.tone-0::before { background: linear-gradient(90deg, var(--c-blue), var(--c-blue-dark)); }
.app-card.tone-1::before { background: linear-gradient(90deg, var(--c-green), var(--c-green-dark)); }
.app-card.tone-2::before { background: linear-gradient(90deg, var(--c-red-soft), var(--c-red)); }

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

.app-card-top {
	display: flex;
	align-items: center;
	gap: 16px;
}

.app-icon-wrap {
	flex-shrink: 0;
	width: 72px;
	height: 72px;
	border-radius: 18px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(24, 27, 30, 0.12);
}

.app-icon {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.app-headings {
	flex: 1;
	min-width: 0;
}

.app-name {
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0 0 4px;
	color: var(--c-text);
	line-height: 1.3;
}

.app-subtitle {
	font-size: 0.9rem;
	color: var(--c-text-soft);
	margin: 0;
	line-height: 1.4;
}

.app-features {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.app-features li {
	font-size: 0.88rem;
	color: var(--c-text-soft);
	padding-left: 18px;
	position: relative;
	line-height: 1.45;
}

.app-features li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.5em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--c-blue);
}

.app-card.tone-1 .app-features li::before { background: var(--c-green-dark); }
.app-card.tone-2 .app-features li::before { background: var(--c-red); }

.app-actions {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	margin-top: auto;
	padding-top: 6px;
}

/* 三個下載 badge 等分卡片寬度（單行不換行） */
.app-actions .store-badge {
	flex: 1 1 0;
	min-width: 0;
}

.store-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-actions .store-badge img {
	width: 100%;
	height: auto;
	max-height: 38px;
	object-fit: contain;
	border-radius: 6px;
}

/* product-actions（hero / CTA 區）的 badge 維持原本固定大小，不被影響 */
.product-actions .store-badge img {
	width: auto;
}

.store-badge:hover {
	transform: translateY(-2px);
	opacity: 0.9;
}

.app-detail-link {
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--c-blue-dark);
	margin-top: 4px;
	transition: gap 0.2s ease, color 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	align-self: flex-start;
}

.app-card.tone-1 .app-detail-link { color: var(--c-green-dark); }
.app-card.tone-2 .app-detail-link { color: var(--c-red); }

.app-detail-link:hover {
	gap: 8px;
}

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

.site-footer {
	background: var(--c-text);
	color: rgba(255, 255, 255, 0.85);
	padding: 60px 28px 40px;
	margin-top: 60px;
}

.footer-inner {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 32px;
	flex-wrap: wrap;
}

.footer-brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}

.footer-brand-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
	color: #fff;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.footer-brand-link:hover {
	opacity: 0.85;
}

.footer-brand-link img {
	background: #fff;
	border-radius: 8px;
	padding: 4px;
}

.footer-brand-text {
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: #fff;
}

.footer-brand-dot {
	color: var(--c-red-soft);
}

.footer-copy {
	margin: 0;
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.7);
}

.footer-brand small {
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.5);
}

.footer-links {
	display: flex;
	gap: 24px;
	align-items: center;
}

.footer-links a,
.footer-links .lang-toggle {
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.9rem;
	transition: color 0.2s ease;
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	padding: 0;
}

.footer-links a:hover,
.footer-links .lang-toggle:hover {
	color: var(--c-yellow);
}

/* =========================================================
   Animations
   ========================================================= */

.app-card {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.app-card.in-view {
	opacity: 1;
	transform: translateY(0);
}

.app-card.in-view:hover {
	transform: translateY(-6px);
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.hero-orb { animation: none; }
	.hero-scroll span { animation: none; }
	.app-card {
		opacity: 1;
		transform: none;
		transition: box-shadow 0.3s ease;
	}
}

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

@media (max-width: 768px) {
	.header-inner {
		padding: 12px 18px;
		position: relative;
		gap: 12px;
	}

	/* brand 限寬避免與漢堡按鈕重疊 */
	.brand {
		flex: 0 1 auto;
		min-width: 0;
		max-width: calc(100% - 56px);
	}


	/* 顯示漢堡按鈕，固定不縮 */
	.nav-toggle {
		display: flex;
		flex-shrink: 0;
	}

	/* 預設隱藏 nav，按下漢堡才滑下 */
	.site-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: rgba(255, 255, 255, 0.98);
		backdrop-filter: saturate(180%) blur(20px);
		-webkit-backdrop-filter: saturate(180%) blur(20px);
		flex-direction: column;
		align-items: stretch;
		gap: 4px;
		padding: 12px 18px 18px;
		border-bottom: 1px solid var(--c-border);
		box-shadow: 0 12px 24px rgba(24, 27, 30, 0.06);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	}

	.site-nav.is-open {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.site-nav a,
	.site-nav .lang-toggle {
		font-size: 15px;
		padding: 12px 14px;
		border-radius: 10px;
		justify-content: flex-start;
		width: 100%;
	}

	.site-nav a:hover,
	.site-nav .lang-toggle:hover {
		background: var(--c-bg);
	}

	.hero {
		padding: 110px 18px 100px;
	}

	.hero-actions {
		flex-direction: column;
		width: 100%;
		max-width: 320px;
		margin-left: auto;
		margin-right: auto;
	}

	.hero-actions .btn {
		width: 100%;
	}

	.hero-stats {
		gap: 12px;
	}

	.hero-stat {
		min-width: 90px;
		padding: 12px 16px;
	}

	.apps-section {
		padding: 70px 18px 60px;
	}

	.apps-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.footer-inner {
		flex-direction: column;
		text-align: center;
		align-items: center;
	}

	.footer-brand {
		align-items: center;
	}
}

@media (max-width: 480px) {
	.app-card {
		padding: 22px 20px 20px;
	}

	.app-logo-wrap {
		width: 56px;
		height: 56px;
	}

	.app-name {
		font-size: 1.05rem;
	}

	/* 手機 gap 縮小 */
	.app-actions {
		gap: 6px;
	}
}
