/* =============================================================
   home-application.css — 首頁 應用領域 Section
   Day 6 Lux 重做（Figma 1:1 直抄）
   來源 node-ids: 42:113 / 42:166 / 42:172 / 42:210 / 42:173 / 42:191 / 42:446
   參考：vite-prototype index.html 行 77-302 + 847-851

   座標基準：Figma Index_PC 1440 寬。Application 區塊 stage 高度
     - Top: chip 在 y:4241 → 視為 stage 起點
     - Bottom: button 在 y:5493 + 56 = 5549
     - 總高 = 5549 - 4241 = 1308px
     - 桌機絕對定位以 stage 起點 (y:4241) 為 origin

   斷點：
     - desktop ≥1440：Figma 1:1
     - desktop 1024-1439：sticky 1440 + 縮放容器
     - tablet 768-1023：mask hide / chip 全寬 / 大字隱藏 / 卡片 2x2
     - mobile <768：1 欄堆疊
   ============================================================= */

/* ===== 桌機基準 — stage（1440 設計稿） ===== */
.rusan-home-application {
	position: relative;
	width: 100%;
	background: var(--color-bg-primary);
	color: var(--color-white);
	overflow: hidden;
	isolation: isolate;
	/* Day 6.5 Anna 反饋「Learn more 跟 Reviews 貼太近」— Figma 兩 section gap 176px，補 margin-bottom */
	margin-bottom: 80px;
}

.rusan-home-application__stage {
	/* Day 8.9 Anna：套 Banner 滿版邏輯 — stage 100% / 內元素用 60 邊距 + Figma 1440 比例 % */
	position: relative;
	width: 100%;
	max-width: none;
	height: 1308px;        /* 5549 - 4241 */
	margin: 0;
}

/* ============================================================
   42:113 白色裝飾大邊框
   Figma: w:1140 h:1059 left:calc(50%-30px) top:4394
   stage origin y:4241 → top:4394-4241 = 153px
   left:calc(50%-30px) translate(-50%) → 中心 -30 偏移
   ============================================================ */
.rusan-home-application__decoframe {
	/* Day 8.9: 跟 Banner 白框一致，left:60 right:60 自適應視窗寬 */
	position: absolute;
	left: 60px;
	right: 60px;
	top: 153px;
	height: 1059px;
	border: 20px solid var(--color-white-20);
	box-sizing: border-box;
	pointer-events: none;
	z-index: 1;
}

/* ============================================================
   42:166 左側大墨鏡 mask group — 4 層
   Figma 整組 absolute contents at top:4301
   stage origin y:4241 → 內部各層 top 都減 4241
   ============================================================ */
.rusan-home-application__mask-group {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
}

/* 42:168 glasses-with-slightly-rounded-frame 1
   Figma: w:1322 h:882 left:-380 top:4157 → top:4157-4241 = -84
   mask-position 380 144 / mask-size 735×1020 */
/* Day 6.5 Anna 反饋「Application 只有灰色眼鏡，上方塞的圖移除」→ 拔 top + bottom + prism 三層，只留 colored（灰色墨鏡 + 壓克力立方體） */
.rusan-home-application__mask--top,
.rusan-home-application__mask--bottom,
.rusan-home-application__mask--prism {
  display: none;
}
.rusan-home-application__mask--top-disabled {
	position: absolute;
	width: 1322px;
	height: 882px;
	left: -380px;
	top: -84px;
	-webkit-mask-repeat: no-repeat;
	        mask-repeat: no-repeat;
	-webkit-mask-position: 380px 144px;
	        mask-position: 380px 144px;
	-webkit-mask-size: 735px 1020px;
	        mask-size: 735px 1020px;
}
.rusan-home-application__mask--top img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	opacity: 0.9;
	pointer-events: none;
}

/* 42:169 glasses-with-slightly-rounded-frame (1) 1
   Figma: w:785 h:1101 left:-40 top:calc(50%+1465px) translate-y(-50%)
   stage origin y:4241，top:50% 在 stage 內 = 654px → +1465 = 2119 - 1101/2(translate-y) = 1568.5
   實作上 stage 高 1308，translate-y(-50%) of self → top = (1308/2) + 1465 - 4241 ... 不對
   重新算：vite-prototype 用的是 Index_PC 整頁的 top:calc(50%+1465px)
   Index_PC 整頁高度 ~5500+，50% 在 ~2750，+1465 = 4215 → 元素中心約在 4215
   stage origin y:4241 → 元素中心 4215-4241 = -26 (top of stage)
   元素 h=1101，translate(-50%) → top = -26 - 550 = -576
   保守簡化：用 bottom 對齊 — 圖在卡片 row 1 中段
   採直接 left:-40 + top:-576px */
.rusan-home-application__mask--bottom {
	position: absolute;
	width: 785px;
	height: 1101px;
	left: -40px;
	top: -576px;
	-webkit-mask-repeat: no-repeat;
	        mask-repeat: no-repeat;
	-webkit-mask-position: 40px 146px;
	        mask-position: 40px 146px;
	-webkit-mask-size: 735px 1020px;
	        mask-size: 735px 1020px;
}
.rusan-home-application__mask--bottom img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: bottom;
	pointer-events: none;
}

/* 42:170 prism-dispersing-light-concept 2
   Figma: w:1594 h:1063 left:-20 top:4266 → top:4266-4241 = 25
   mask-position 20 35 / mask-size 735×1020 */
.rusan-home-application__mask--prism {
	position: absolute;
	width: 1594px;
	height: 1063px;
	left: -20px;
	top: 25px;
	-webkit-mask-repeat: no-repeat;
	        mask-repeat: no-repeat;
	-webkit-mask-position: 20px 35px;
	        mask-position: 20px 35px;
	-webkit-mask-size: 735px 1020px;
	        mask-size: 735px 1020px;
}
.rusan-home-application__mask--prism img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	pointer-events: none;
}

/* 42:171 colored-transparent-sunglasses-still-life 1
   Figma: w:796 h:1194 left:-30 top:4152 → top:4152-4241 = -89
   mask-position 30 149 / mask-size 735×1020 */
.rusan-home-application__mask--colored {
	position: absolute;
	width: 796px;
	height: 1194px;
	left: -30px;
	top: -89px;
	-webkit-mask-repeat: no-repeat;
	        mask-repeat: no-repeat;
	-webkit-mask-position: 30px 149px;
	        mask-position: 30px 149px;
	-webkit-mask-size: 735px 1020px;
	        mask-size: 735px 1020px;
}
.rusan-home-application__mask--colored img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	pointer-events: none;
}

/* ============================================================
   42:210 chip 「應用領域」
   Figma: 430×202 left:0 top:4241 → top:0 left:0
   含 42:211 body (#1e2b45) + 42:216 切角 60px Vector4
   ============================================================ */
.rusan-home-application__chip {
	position: absolute;
	left: 0;
	top: 0;
	display: flex;
	align-items: stretch;
	z-index: 4;
}

.rusan-home-application__chip-body {
	background: var(--color-blue-deep);   /* #1e2b45 */
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 40px 40px 40px 60px;          /* py:40 pl:60 pr:40 */
	color: var(--color-white);
}

.rusan-home-application__chip-title {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.rusan-home-application__chip-content {
	display: flex;
	flex-direction: column;
	gap: 20px;
	align-items: flex-start;
	color: var(--color-white);
}

.rusan-home-application__chip-heading {
	margin: 0;
	font-family: var(--font-en, 'Roboto'), 'Noto Sans JP', var(--font-zh);
	font-weight: 700;
	font-size: var(--text-3xl);            /* 40px */
	line-height: 1.2;
	white-space: nowrap;
}

.rusan-home-application__chip-subtitle {
	font-family: var(--font-en, 'Roboto'), 'Noto Sans JP', var(--font-zh);
	font-weight: 400;
	font-size: var(--text-base);           /* 18px */
	color: var(--color-white);
}
.rusan-home-application__chip-subtitle p {
	margin: 0;
	line-height: 1.5;
	white-space: nowrap;
}

/* 42:216 chip 切角 — 60px 寬，貼右 */
.rusan-home-application__chip-corner {
	position: relative;
	flex: 0 0 60px;
	width: 60px;
	align-self: stretch;
}
.rusan-home-application__chip-corner img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	display: block;
}

/* ============================================================
   42:172 「Application」大字浮水印
   Figma: 314×90 left:675 top:4321 → top:80 left:675
   Oswald 60px uppercase white
   ============================================================ */
.rusan-home-application__display {
	/* Day 8.9: left 用 % (675/1440=46.88%) 配合滿版自適應 */
	position: absolute;
	left: 46.88%;
	top: 80px;
	margin: 0;
	font-family: 'Oswald', var(--font-en, 'Roboto'), sans-serif;
	font-weight: 600;
	font-size: 60px;                      /* Figma 60px */
	line-height: 1.5;
	color: var(--color-white);
	text-transform: uppercase;
	white-space: nowrap;
	z-index: 3;
}

/* ============================================================
   42:173 / 42:191 兩排卡片（grid 容器）
   Row 1: 645×454 at left:675 top:4454 → top:213
   Row 2: 645×455 at left:675 top:4938 → top:697
   gap 30px
   ============================================================ */
.rusan-home-application__grid {
	/* Day 8.9: left 46.88% (675/1440)、width 44.79% (645/1440) 配合滿版 */
	position: absolute;
	left: 46.88%;
	top: 213px;
	width: 44.79%;
	display: flex;
	flex-direction: column;
	gap: 30px;                            /* 484 - 454 = 30 row gap */
	z-index: 4;
}

.rusan-home-application__row {
	display: flex;
	gap: 30px;
	align-items: center;
	width: 100%;
}

/* 卡片本體 — 工業安全 / 運動眼鏡 / 實驗室 / 專業工作環境 */
.rusan-home-application__card {
	display: flex;
	flex-direction: column;
	flex: 1 0 0;
	min-width: 0;
	height: 454px;
	overflow: hidden;
	position: relative;
	color: var(--color-white);
	background-image:
		linear-gradient(90deg, rgb(0,0,0) 0%, rgb(0,0,0) 100%),
		linear-gradient(93.4029deg, rgb(0,0,0) 0%, rgb(51,51,51) 99.865%);
}

/* Bug fix: Anna 反饋「圖片跑掉、卡片下方文字沒有出現」根因
   原 mask 容器沒設 height → 圖片放大撐滿整 card，把 card-content 擠出視野。
   原 mask-img width:226.67% + 卡 1 josh-beech 數值套到 4 卡 → 其他 3 卡圖跑出 mask 外不見。
   修：card-mask 固定 280px 高（圖區），content 自動接 174px；mask 全拔，圖直接 cover 撐滿。 */
.rusan-home-application__card-mask {
	position: relative;
	width: 100%;
	height: 280px;
	overflow: hidden;
	flex-shrink: 0;
}

.rusan-home-application__card-mask-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	-webkit-mask-image: none !important;
	        mask-image: none !important;
	opacity: 0;            /* 底圖隱藏，避免蓋過真實情境照 */
}
.rusan-home-application__card-mask-bg img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	pointer-events: none;
}

.rusan-home-application__card-mask-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	-webkit-mask-image: none !important;
	        mask-image: none !important;
	z-index: 2;
}
.rusan-home-application__card-mask-img img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
	pointer-events: none;
	display: block;
}

/* 卡片內容區 — Figma: gap 20 p 30，flex-col items-center text-white */
.rusan-home-application__card-content {
	display: flex;
	flex-direction: column;
	gap: 20px;
	align-items: center;
	padding: 30px;
	width: 100%;
	color: var(--color-white);
}

/* Figma 42:180/189/199/208 — Bold 20px line 1.3 */
.rusan-home-application__card-heading {
	margin: 0;
	font-family: var(--font-en, 'Roboto'), 'Noto Sans JP', var(--font-zh);
	font-weight: 700;
	font-size: var(--text-lg);              /* 20px */
	line-height: 1.3;
	width: 100%;
}

/* Figma 42:181/190/200/209 — Regular 16px line 1.5 */
.rusan-home-application__card-text {
	margin: 0;
	font-family: var(--font-en, 'Roboto'), 'Noto Sans JP', var(--font-zh);
	font-weight: 400;
	font-size: var(--text-sm);              /* 16px */
	line-height: 1.5;
	width: 100%;
}

/* ============================================================
   42:446 Learn more 按鈕
   Figma: 160×56 px:40 py:16 left:calc(50%+0.5px) top:5493
   stage origin y:4241 → top:5493-4241 = 1252
   bg #2258b2 backdrop-blur 12 + Oswald medium 16 white uppercase
   ============================================================ */
.rusan-home-application__cta {
	position: absolute;
	left: 50%;
	top: 1252px;
	transform: translateX(-50%);
	z-index: 5;
}
.rusan-home-application__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 160px;
	height: 56px;
	padding: 16px 40px;
	background: var(--color-blue-primary);   /* #2258b2 */
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	color: var(--color-white);
	text-decoration: none;
	font-family: 'Oswald', var(--font-en, 'Roboto'), sans-serif;
	font-weight: 500;
	font-size: var(--text-sm);              /* 16px */
	line-height: 1.5;
	text-transform: uppercase;
	white-space: nowrap;
	border: 0;
	box-sizing: border-box;
	cursor: pointer;
	transition: background-color .2s ease, opacity .2s ease;
}
.rusan-home-application__btn:hover {
	background: var(--color-blue-medium);
}
.rusan-home-application__btn:focus-visible {
	outline: 2px solid var(--color-blue-bright);
	outline-offset: 2px;
}

/* Day 8.9: ≥1440 / 1024-1439 不再單獨寫 stage 寬 — base rule 已 width:100%，1024-1439 由 page-home zoom 縮 */

/* ============================================================
   斷點：平板 768-1023 — Reflow
   - 隱藏左側大墨鏡 mask group（避免擋字）
   - 隱藏裝飾大邊框
   - chip 從絕對改靜態，全寬上方
   - Application 大字隱藏（避免遮擋）
   - 4 卡 2x2 grid
   - CTA 靜態置中
   ============================================================ */
@media (max-width: 1023px) {
	.rusan-home-application {
		padding: 64px var(--page-padding-tablet) 80px;
	}
	.rusan-home-application__stage {
		width: 100%;
		max-width: 100%;
		height: auto;
		display: flex;
		flex-direction: column;
		gap: 32px;
	}

	.rusan-home-application__decoframe { display: none; }
	.rusan-home-application__mask-group { display: none; }

	/* chip 全寬靜態 */
	.rusan-home-application__chip {
		position: static;
		width: 100%;
	}
	.rusan-home-application__chip-body {
		width: 100%;
		padding: 28px 24px;
	}
	.rusan-home-application__chip-heading {
		font-size: var(--text-2xl);          /* 30px */
	}
	.rusan-home-application__chip-subtitle {
		font-size: var(--text-sm);
	}
	.rusan-home-application__chip-subtitle p {
		white-space: normal;
	}
	.rusan-home-application__chip-corner { display: none; }

	/* 大字隱藏（避免擠壓） */
	.rusan-home-application__display { display: none; }

	/* grid 改 2x2 */
	.rusan-home-application__grid {
		position: static;
		width: 100%;
		left: auto;
		top: auto;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}
	.rusan-home-application__row {
		display: contents;                    /* 解構 row 容器，讓 4 卡都進 grid */
	}
	.rusan-home-application__card {
		height: auto;
		min-height: 380px;
	}

	/* ---- 卡片圖：拆掉桌機 mask 設定，圖滿卡寬、文字下方 ----
	   桌機原本用 inline-grid 把 bg + img 用 SVG mask 罩成異形圖，
	   設計值是固定 px mask-size + 負百分比 width，窄卡會 broken。
	   平板/手機改回標準 block：bg 隱藏 + 真情境圖 100% 寬 4/3 cover。 */
	.rusan-home-application__card-mask {
		display: block;
		width: 100%;
		aspect-ratio: 4 / 3;
		overflow: hidden;
	}
	.rusan-home-application__card-mask-bg { display: none; }
	.rusan-home-application__card-mask-img {
		display: block;
		width: 100%;
		height: 100%;
		margin: 0;
		aspect-ratio: auto;
		-webkit-mask-image: none;
		        mask-image: none;
		-webkit-mask-size: auto;
		        mask-size: auto;
		-webkit-mask-position: 0 0;
		        mask-position: 0 0;
	}
	.rusan-home-application__card-mask-img img {
		position: static;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
	}

	/* CTA 靜態置中 */
	.rusan-home-application__cta {
		position: static;
		transform: none;
		display: flex;
		justify-content: center;
		margin-top: 16px;
	}
}

/* ============================================================
   斷點：手機 <768 — 1 欄堆疊
   ============================================================ */
@media (max-width: 767px) {
	.rusan-home-application {
		padding: 48px var(--page-padding-mobile) 64px;
	}
	.rusan-home-application__stage {
		gap: 24px;
	}

	.rusan-home-application__chip-body {
		padding: 24px 20px;
	}
	.rusan-home-application__chip-heading {
		font-size: var(--text-xl);            /* 24px */
	}
	.rusan-home-application__chip-subtitle {
		font-size: var(--text-xs);
	}

	.rusan-home-application__grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.rusan-home-application__card {
		min-height: 340px;
	}
	.rusan-home-application__card-content {
		padding: 24px 20px;
		gap: 16px;
	}
	.rusan-home-application__card-heading {
		font-size: var(--text-base);          /* 18px */
	}
	.rusan-home-application__card-text {
		font-size: var(--text-xs);            /* 14px */
		line-height: 1.6;
	}

	.rusan-home-application__btn {
		width: 100%;
		max-width: 320px;
		padding: 14px 28px;
		height: 52px;
	}
}
