/* ============================================================
   首頁 - 技術能力 Section（the Technique）
   Figma node-id: 42:217 mask group / 42:220 大字 / 42:221 4 卡 / 42:259 chip
   斷點：
     ≥1440  桌機原稿（絕對定位，1440 基準）
     1024-1439  由 JS zoom 等比縮放（vite-prototype 行為）
     768-1023   平板：2×2 grid
     <768       手機：1 col 直堆疊
   ============================================================ */

/* ---------- 桌機（≥1024）— Day 8.6 套 Banner 滿版邏輯：max-width 拔、內元素用 left:60/right:60 邊距 ---------- */
.rusan-home-tech {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  height: 869px;          /* 42:217 整區高度 */
  overflow: hidden;
  background: var(--color-bg-primary, #111);
  font-family: var(--font-en, 'Roboto'), var(--font-jp, 'Noto Sans JP'), var(--font-zh, 'Noto Sans TC'), sans-serif;
  box-sizing: border-box;
}

/* ---------- 42:217 / 42:218 / 42:219 整區 mask 背景 ---------- */
.rusan-home-tech__bg-group {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.rusan-home-tech__bg-img {
  position: absolute;
  /* Day 8.6: 滿版 stretch 取代 Figma 1440 寫死 */
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.rusan-home-tech__bg-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
  opacity: 0.8;
  pointer-events: none;
  display: block;
}

/* ---------- 42:259 chip（深藍 + 60px 切角） ---------- */
.rusan-home-tech {
  /* Day 8.6: chip / display / container 不再各自用 mask（mask 統一在 bg-img），避免 1440 寫死 */
}
.rusan-home-tech__chip {
  position: absolute;
  left: 0;
  top: 60px;              /* 2174 - 2114 = 60 */
  display: flex;
  align-items: stretch;
  z-index: var(--z-content, 1);
}
.rusan-home-tech__chip-body {
  background: var(--color-blue-deep, #1e2b45);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--spacing-10, 40px) var(--spacing-10, 40px) var(--spacing-10, 40px) var(--spacing-12, 60px);
}
.rusan-home-tech__chip-section,
.rusan-home-tech__chip-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.rusan-home-tech__chip-content {
  gap: var(--spacing-6, 20px);
  color: var(--color-white, #fff);
  white-space: nowrap;
}
.rusan-home-tech__chip-heading {
  margin: 0;
  font-family: var(--font-en, 'Roboto'), var(--font-jp, 'Noto Sans JP'), sans-serif;
  font-weight: var(--weight-bold, 700);
  font-size: var(--text-3xl, 40px);
  line-height: var(--leading-tight, 1.2);
  font-variation-settings: 'wdth' 100;
}
.rusan-home-tech__chip-subtitle {
  margin: 0;
  font-family: var(--font-en, 'Roboto'), var(--font-jp, 'Noto Sans JP'), sans-serif;
  font-weight: var(--weight-regular, 400);
  font-size: var(--text-base, 18px);
  line-height: var(--leading-relaxed, 1.5);
  font-variation-settings: 'wdth' 100;
}
.rusan-home-tech__chip-corner {
  position: relative;
  width: 60px;
  align-self: stretch;
  flex-shrink: 0;
}
.rusan-home-tech__chip-corner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  max-width: none;
}

/* ---------- 42:220 「the Technique」大字 ---------- */
.rusan-home-tech__display {
  position: absolute;
  left: 60px;
  top: 429px;             /* 2543 - 2114 = 429 */
  margin: 0;
  font-family: var(--font-display, 'Oswald'), sans-serif;
  font-weight: 600;
  font-size: var(--text-5xl, 60px);
  line-height: var(--leading-relaxed, 1.5);
  text-transform: uppercase;
  color: var(--color-white, #fff);
  white-space: nowrap;
  z-index: var(--z-content, 1);
}

/* ---------- 42:221 Container ---------- */
.rusan-home-tech__container {
  /* Day 8.6: 跟 Banner 白框一致 — left:60 right:60，width auto，滿版自適應 */
  position: absolute;
  left: 60px;
  right: 60px;
  top: 539px;             /* 2653 - 2114 = 539 */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: var(--z-content, 1);
}

/* ---------- 42:222 Row ---------- */
.rusan-home-tech__row {
  display: flex;
  gap: var(--spacing-8, 30px);
  align-items: stretch;
  width: 100%;
  min-height: 270px;        /* Figma 卡片高度基準 */
}

/* ---------- 42:223 / 232 / 241 / 250 Column ---------- */
.rusan-home-tech__col {
  flex: 1 0 0;
  min-width: 0;
  min-height: 270px;        /* Figma：每張卡 ≥ 270px */
  background: var(--color-black, #000);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-6, 20px);
  align-items: flex-start;
  padding: var(--spacing-6, 20px);
  align-self: stretch;
  box-sizing: border-box;
}

/* Section Title 區塊（撐高用 flex:1） */
.rusan-home-tech__section {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-start;
}
.rusan-home-tech__tagline-wrap {
  display: flex;
  align-items: center;
}
.rusan-home-tech__tagline {
  margin: 0;
  font-family: var(--font-en, 'Roboto'), var(--font-jp, 'Noto Sans JP'), sans-serif;
  font-weight: var(--weight-semibold, 600);
  font-size: var(--text-sm, 16px);
  line-height: var(--leading-relaxed, 1.5);
  color: var(--color-white, #fff);
  white-space: nowrap;
  font-variation-settings: 'wdth' 100;
}
.rusan-home-tech__content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-5, 16px);
  align-items: flex-start;
}
.rusan-home-tech__line {
  width: 100%;
  height: 1px;
  position: relative;
}
.rusan-home-tech__line img {
  display: block;
  width: 100%;
  height: 1px;
  max-width: none;
}
.rusan-home-tech__heading {
  margin: 0;
  width: 100%;
  font-family: var(--font-en, 'Roboto'), var(--font-jp, 'Noto Sans JP'), sans-serif;
  font-weight: var(--weight-bold, 700);
  font-size: var(--text-xl, 24px);
  line-height: var(--leading-normal, 1.4);
  color: var(--color-white, #fff);
  font-variation-settings: 'wdth' 100;
}
.rusan-home-tech__text {
  margin: 0;
  width: 100%;
  font-family: var(--font-en, 'Roboto'), var(--font-jp, 'Noto Sans JP'), sans-serif;
  font-weight: var(--weight-regular, 400);
  font-size: var(--text-sm, 16px);
  line-height: var(--leading-relaxed, 1.5);
  color: var(--color-white-80, rgba(255,255,255,0.8));
  font-variation-settings: 'wdth' 100;
}

/* Button (探索 ›) */
.rusan-home-tech__btn {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-2, 8px);
  width: 100%;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  transition: opacity .2s ease;
}
.rusan-home-tech__btn:hover { opacity: 0.85; }
.rusan-home-tech__btn-text {
  font-family: var(--font-en, 'Roboto'), var(--font-jp, 'Noto Sans JP'), sans-serif;
  font-weight: var(--weight-semibold, 600);
  font-size: var(--text-sm, 16px);
  line-height: var(--leading-relaxed, 1.5);
  color: var(--color-blue-medium, #4076d0);
  white-space: nowrap;
  font-variation-settings: 'wdth' 100;
}
.rusan-home-tech__btn-icon {
  position: relative;
  display: inline-block;
  width: var(--icon-sm, 24px);
  height: var(--icon-sm, 24px);
  flex-shrink: 0;
  overflow: hidden;
}
/* Day 6.4 Anna「探索右邊的箭頭太大」根因 — Vector2.svg viewBox 6.69×11.62
   svg 自身 width="100%" height="100%" 覆蓋 CSS width:auto → render 成 300×150 default
   解：固定 px size = viewBox 真值 + 居中（對應 Figma inset 24×27.88%w 48.4%h） */
.rusan-home-tech__btn-icon img {
  position: absolute;
  display: block;
  width: 6.7px;
  height: 11.62px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: none;
}

/* ============================================================
   平板 768-1023：2×2 grid，section 高度自然撐
   （桌機 zoom 由 JS 在 1024-1439 處理；<1024 改 mobile 排版）
   ============================================================ */
@media (max-width: 1023px) {
  .rusan-home-tech {
    height: auto;
    min-height: 600px;
    padding: 100px var(--page-padding-tablet, 32px) var(--spacing-16, 80px);
  }
  .rusan-home-tech__bg-group {
    inset: 0;
  }
  .rusan-home-tech__bg-img {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
    -webkit-mask-size: cover;
    mask-size: cover;
  }
  .rusan-home-tech__chip {
    position: relative;
    left: auto;
    top: auto;
    margin: 0 calc(var(--page-padding-tablet, 32px) * -1) var(--spacing-10, 40px);
    -webkit-mask-image: none;
    mask-image: none;
  }
  .rusan-home-tech__chip-body {
    padding: var(--spacing-8, 30px) var(--spacing-8, 30px) var(--spacing-8, 30px) var(--spacing-10, 40px);
  }
  /* Day 8.7: chip 副標窄視窗 normal wrap，避免 nowrap 超出 */
  .rusan-home-tech__chip-content {
    white-space: normal;
  }
  .rusan-home-tech__chip-heading {
    font-size: var(--text-2xl, 30px);
  }
  .rusan-home-tech__display {
    position: relative;
    left: auto;
    top: auto;
    margin: 0 0 var(--spacing-8, 30px);
    font-size: var(--text-4xl, 48px);
    -webkit-mask-image: none;
    mask-image: none;
  }
  .rusan-home-tech__container {
    position: relative;
    left: auto;
    right: auto;          /* Day 8.7: 蓋桌機 base right:60 防 mobile 寬度被拘 */
    top: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .rusan-home-tech__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-6, 20px);
  }
  .rusan-home-tech__col {
    align-self: auto;
    min-height: 280px;
  }
}

/* ============================================================
   手機 <768：1 column 直堆疊
   ============================================================ */
@media (max-width: 767px) {
  .rusan-home-tech {
    padding: 80px var(--page-padding-mobile, 16px) var(--spacing-12, 60px);
    min-height: 500px;
  }
  .rusan-home-tech__chip {
    margin: 0 calc(var(--page-padding-mobile, 16px) * -1) var(--spacing-8, 30px);
  }
  .rusan-home-tech__chip-body {
    padding: var(--spacing-7, 24px) var(--spacing-7, 24px) var(--spacing-7, 24px) var(--spacing-8, 30px);
  }
  .rusan-home-tech__chip-heading { font-size: var(--text-xl, 24px); }
  .rusan-home-tech__chip-subtitle { font-size: var(--text-sm, 16px); }
  .rusan-home-tech__chip-corner { width: 30px; }
  .rusan-home-tech__display {
    font-size: var(--text-2xl, 30px);
    margin-bottom: var(--spacing-7, 24px);
  }
  .rusan-home-tech__row {
    grid-template-columns: 1fr;
    gap: var(--spacing-5, 16px);
  }
  .rusan-home-tech__col {
    min-height: 0;
    padding: var(--spacing-6, 20px);
  }
  .rusan-home-tech__heading { font-size: var(--text-lg, 20px); }
}

/* Day 8.6: ≥1440 不再寫死 width:1440px — base rule 已用 width:100% 滿版 */
