/* =========================================================
   設想工程 SHESIANG ENGINEERING - style.css
   Pure CSS3 / BEM / No framework
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
  --color-primary: #a65b2a; /* 暖色主色：赤陶銅色（原 #2d8592） */
  --color-secondary: #8f6b2e; /* 副色：暖金棕（原 #827651），白字對比 ≥ 4.5 */
  --color-dark: #040000;
  --color-text: #040000;
  --color-bg: #ffffff;

  --color-primary-dark: #7a3f1a; /* 主色深（原 #236a75） */
  --color-secondary-light: #d4b072; /* 副色淺（原 #b3a77f） */
  --color-gray-bg: #f7f8f9;
  --color-border: #e4e7ea;
  --color-muted: #5b5f63;
  --color-line: #06c755;

  --font-base: "Noto Sans TC", sans-serif;
  --font-en: "Montserrat", "Noto Sans TC", sans-serif;

  --header-h: 80px;
  --container: 1240px;
  --radius: 6px;
  --shadow-sm: 0 2px 10px rgba(4, 0, 0, 0.06);
  --shadow-md: 0 12px 32px rgba(4, 0, 0, 0.12);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (max-width: 991px) {
  :root {
    --header-h: 64px;
  }
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

h1, h2, h3, p, ul, ol, dl, dd {
  margin: 0;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

section[id] {
  scroll-margin-top: var(--header-h);
}

/* 標題斷行：以詞組為單位，只在詞組之間換行（避免「木作」被拆成「木 / 作」） */
.u-keep {
  display: inline-block;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 767px) {
  .container {
    padding: 0 16px;
  }
}

/* ---------- Section ---------- */
.section {
  padding: 110px 0;
}

.section--gray {
  background: var(--color-gray-bg);
}

@media (max-width: 767px) {
  .section {
    padding: 72px 0;
  }
}

/* ---------- Section Heading (bilingual) ---------- */
.section-heading {
  text-align: center;
  margin-bottom: 56px;
}

.section-heading--left {
  text-align: left;
  margin-bottom: 24px;
}

.section-heading__en {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.28em;
  color: var(--color-secondary);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.section-heading__en::before {
  content: "";
  width: 32px;
  height: 2px;
  background: var(--color-primary);
}

.section-heading__title {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.section-heading__desc {
  max-width: 720px;
  margin: 16px auto 0;
  color: var(--color-muted);
}

@media (max-width: 767px) {
  .section-heading {
    margin-bottom: 40px;
  }
}

/* ---------- Button ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 30px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-align: center;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  background: var(--color-primary);
  color: #fff;
}

.button--primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 10px 24px rgba(166, 91, 42, 0.35);
}

.button--secondary {
  background: var(--color-secondary);
  color: #fff;
}

.button--secondary:hover {
  background: var(--color-primary);
}

.button--outline-light {
  border-color: #fff;
  color: #fff;
}

.button--outline-light:hover {
  background: #fff;
  color: var(--color-text);
}

.button--hover-secondary:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #fff;
}

.button--outline-dark {
  border-color: var(--color-text);
  color: var(--color-text);
}

.button--outline-dark:hover {
  background: var(--color-text);
  color: #fff;
}

.button--white {
  background: #fff;
  color: var(--color-text);
}

.button--white:hover {
  background: var(--color-primary);
  color: #fff;
}

.button--light {
  background: #fff;
  color: var(--color-primary);
}

.button--light:hover {
  background: var(--color-dark);
  color: #fff;
}

.button--line {
  background: var(--color-line);
  color: #fff;
}

.button--line:hover {
  background: #05a648;
}

/* Hero 專用 LINE 按鈕：白底深主色字＋綠色 LINE 圖示，在主色遮罩上最醒目；Hover 轉金色 */
.button--hero {
  background: #fff;
  color: var(--color-primary-dark);
  box-shadow: 0 10px 26px rgba(32, 18, 8, 0.35);
}

.button--hero .button__icon {
  width: 22px;
  height: 22px;
  fill: var(--color-line);
  transition: fill 0.3s var(--ease);
}

.button--hero:hover {
  background: var(--color-secondary);
  color: #fff;
  box-shadow: 0 14px 30px rgba(32, 18, 8, 0.45);
}

.button--hero:hover .button__icon {
  fill: #fff;
}

.button--block {
  width: 100%;
}

.button__icon {
  flex-shrink: 0;
}

/* =========================================================
   Header（固定置頂，捲動時不隱藏）
   ========================================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

.header--shadow {
  box-shadow: 0 6px 20px rgba(4, 0, 0, 0.08);
  border-bottom-color: var(--color-border);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 1440px;
}

.header__logo {
  flex-shrink: 0;
  margin-right: auto;
}

.header__logo-img {
  height: 36px;
  width: auto;
}

.header__menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header__link {
  position: relative;
  display: block;
  padding: 8px 12px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.06em;
  transition: color 0.3s var(--ease);
}

.header__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.header__link:hover,
.header__link--active {
  color: var(--color-primary);
}

.header__link:hover::after,
.header__link--active::after {
  transform: scaleX(1);
}

.header__cta {
  flex-shrink: 0;
  padding: 10px 24px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: background-color 0.3s var(--ease);
}

.header__cta:hover {
  background: var(--color-secondary);
}

.header__toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.header__toggle-bar {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}

@media (max-width: 1199px) {
  .header__link {
    padding: 8px 8px;
    font-size: 14px;
  }

  .header__link::after {
    left: 8px;
    right: 8px;
  }

  .header__inner {
    gap: 16px;
  }
}

@media (max-width: 991px) {
  .header__nav,
  .header__cta {
    display: none;
  }

  .header__toggle {
    display: flex;
  }

  .header__logo-img {
    height: 28px;
  }
}

/* =========================================================
   Mobile Fullscreen Menu
   ========================================================= */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-16px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s;
}

.mobile-menu--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s;
}

.mobile-menu__top {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 16px;
  background: var(--color-dark);
}

.mobile-menu__logo-img {
  height: 28px;
  width: auto;
  /* 暫代 logo-w.svg：將黑色 Logo 反白 */
  filter: brightness(0) invert(1);
}

.mobile-menu__close {
  position: relative;
  width: 44px;
  height: 44px;
}

.mobile-menu__close-bar {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.mobile-menu__close-bar:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-menu__close-bar:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.mobile-menu__nav {
  padding: 8px 24px 0;
}

.mobile-menu__item {
  border-bottom: 1px solid var(--color-border);
}

.mobile-menu__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 4px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: color 0.3s var(--ease), padding-left 0.3s var(--ease);
}

.mobile-menu__link:hover {
  color: var(--color-primary);
  padding-left: 10px;
}

.mobile-menu__en {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--color-secondary);
}

.mobile-menu__cta {
  padding: 28px 24px 0;
}

.mobile-menu__contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 24px 40px;
  text-align: center;
}

.mobile-menu__line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  margin-bottom: 10px;
  border-radius: 999px;
  border: 2px solid var(--color-line);
  color: var(--color-line);
  font-family: var(--font-en);
  font-weight: 700;
}

.mobile-menu__line-badge {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--color-line);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.mobile-menu__info {
  font-size: 14px;
  color: var(--color-muted);
}

@media (min-width: 992px) {
  .mobile-menu {
    display: none;
  }
}

/* =========================================================
   1. Hero Carousel
   ========================================================= */
.main {
  padding-top: var(--header-h);
  overflow-x: clip; /* 避免左右滑入動畫造成水平捲軸 */
}

.hero {
  position: relative;
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  min-height: 560px;
  max-height: 960px;
  overflow: hidden;
  background: var(--color-dark);
  color: #fff;
}

.hero__slider {
  position: relative;
  height: 100%;
}

.hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s var(--ease), visibility 0s linear 0.9s;
}

.hero__slide--active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  transition: opacity 0.9s var(--ease), visibility 0s;
}

.hero__media,
.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 7s linear;
}

.hero__slide--active .hero__image {
  transform: scale(1);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  /* 深炭黑由左向右漸層淡出（與琥珀金強調字拉開色差），底部再壓一層暗角 */
  background:
    linear-gradient(0deg, rgba(12, 12, 14, 0.6) 0%, rgba(12, 12, 14, 0) 32%),
    linear-gradient(90deg,
      rgba(12, 12, 14, 0.9) 0%,
      rgba(16, 16, 18, 0.78) 36%,
      rgba(20, 20, 22, 0.3) 64%,
      rgba(20, 20, 22, 0) 85%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--container);
}

.hero__content > * {
  max-width: 720px;
}

.hero__slide--active .hero__content > * {
  animation: hero-fade-up 0.9s var(--ease) both;
}

.hero__slide--active .hero__content > *:nth-child(2) { animation-delay: 0.12s; }
.hero__slide--active .hero__content > *:nth-child(3) { animation-delay: 0.24s; }
.hero__slide--active .hero__content > *:nth-child(4) { animation-delay: 0.36s; }
.hero__slide--active .hero__content > *:nth-child(5) { animation-delay: 0.48s; }

/* 中文小標（依客戶稿）：琥珀金、不加引導線 */
.hero__eyebrow {
  font-size: clamp(16px, 1.6vw, 24px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f5c46e;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  margin-bottom: 18px;
}

/* 大標題：第一行白字、第二行琥珀金；文字陰影拉出層次 */
.hero__title {
  font-size: clamp(32px, 4.5vw, 80px);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero__title-accent {
  color: #f5c46e;
}

/* 大標題不受內容寬度限制 */
.hero__content > .hero__title {
  max-width: none;
}

/* 副標：一般字重的兩行說明文字 */
.hero__subtitle {
  font-size: clamp(16px, 1.6vw, 26px);
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  margin-bottom: 28px;
}

/* 施工流程列：左側琥珀金直條＋箭頭串接 */
.hero__steps {
  padding-left: 18px;
  border-left: 4px solid #f5c46e;
  font-size: clamp(15px, 1.4vw, 22px);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  margin-bottom: 56px; /* 與下方按鈕拉開距離 */
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 48px;
}

/* 主按鈕：主色實心、圓角方形（依客戶稿，不放 LINE 圖示） */
.hero__cta {
  min-height: 60px;
  padding: 14px 40px;
  border-radius: 10px;
  font-size: clamp(16px, 1.3vw, 20px);
  letter-spacing: 0.06em;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.hero__cta:hover {
  background: var(--color-secondary);
}

/* 次要文字連結：白字底線 */
.hero__link {
  padding: 6px 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  font-size: clamp(15px, 1.3vw, 20px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.hero__link:hover {
  color: #f5c46e;
  border-color: #f5c46e;
}

.hero__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: #fff;
  transform: translateY(-50%);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.hero__arrow:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.hero__arrow--prev {
  left: 24px;
}

.hero__arrow--next {
  right: 24px;
}

.hero__pagination {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 3;
  display: flex;
  gap: 12px;
  transform: translateX(-50%);
}

.hero__dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.4s var(--ease), background-color 0.4s var(--ease);
}

.hero__dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.hero__dot--active {
  width: 36px;
  background: var(--color-primary);
}

@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1200px) {
  .hero__content {
    padding-left: 96px;
    padding-right: 96px;
  }
}

@media (max-width: 767px) {
  /* 手機版：輪播高度約為螢幕的 2/3 */
  .hero {
    height: 66.667vh;
    height: 66.667svh;
    min-height: 480px; /* 內容含流程列與雙連結，小螢幕保留與箭頭的間距 */
  }

  .hero__slide {
    align-items: center;
    padding-bottom: 48px; /* 預留底部箭頭與分頁點空間 */
    text-align: center;
  }

  .hero__overlay {
    /* 手機文字置中，改為整片深炭黑遮罩 */
    background:
      linear-gradient(0deg, rgba(12, 12, 14, 0.55) 0%, rgba(12, 12, 14, 0) 40%),
      rgba(16, 16, 18, 0.66);
  }

  /* 手機：標題依詞組換行，字級確保每個詞組放得下 */
  .hero__title {
    font-size: 30px;
    margin-bottom: 14px;
  }

  .hero__content > * {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__eyebrow {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .hero__subtitle {
    font-size: 15px;
    margin-bottom: 16px;
  }

  /* 手機：流程列整塊置中，保留左側琥珀金直條 */
  .hero__steps {
    width: fit-content;
    padding-left: 12px;
    border-left-width: 3px;
    font-size: 13px;
    text-align: left;
    margin-bottom: 32px;
  }

  .hero__actions {
    flex-direction: column;
    justify-content: center;
    gap: 12px;
  }

  .hero__cta {
    min-height: 50px;
    padding: 10px 32px;
  }

  .hero__arrow {
    top: auto;
    bottom: 20px;
    width: 42px;
    height: 42px;
    transform: none;
  }

  .hero__arrow--prev {
    left: 16px;
  }

  .hero__arrow--next {
    right: 16px;
  }

  .hero__pagination {
    bottom: 34px;
  }
}

/* =========================================================
   2. About
   ========================================================= */
.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.about__media {
  position: relative;
  padding: 0 24px 24px 0;
}

.about__media::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 24px;
  right: 0;
  bottom: 0;
  border: 2px solid var(--color-secondary);
  border-radius: var(--radius);
}

.about__image {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.about__badge {
  position: absolute;
  left: -12px;
  bottom: 48px;
  padding: 10px 20px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-md);
}

.about__slogan {
  font-size: 19px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.about__text {
  color: #2c2c2c;
  margin-bottom: 16px;
  text-align: justify;
}

.about__text strong {
  color: var(--color-text);
  font-weight: 700;
  background: linear-gradient(transparent 62%, rgba(166, 91, 42, 0.18) 62%);
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 32px;
}

.about__stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 16px;
  background: var(--color-gray-bg);
  border-top: 3px solid var(--color-primary);
  border-radius: 0 0 var(--radius) var(--radius);
}

.about__stat-value {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.about__stat-num {
  font-family: var(--font-en);
  font-size: 36px;
  font-weight: 800;
  color: var(--color-primary);
}

.about__stat-label {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.5;
}

@media (max-width: 991px) {
  .about__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 575px) {
  .about__stats {
    grid-template-columns: 1fr;
  }

  .about__stat {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }
}

/* =========================================================
   3. Services
   ========================================================= */
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  height: 4px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

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

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

.service-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.service-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.service-card:hover .service-card__image {
  transform: scale(1.05);
}

.service-card__num {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  background: var(--color-secondary);
  color: #fff;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  border-radius: 4px;
  transition: background-color 0.3s var(--ease);
}

.service-card:hover .service-card__num {
  background: var(--color-primary);
}

.service-card__body {
  padding: 22px 22px 26px;
}

.service-card__title {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.service-card__en {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-secondary);
  margin: 4px 0 12px;
}

.service-card__text {
  font-size: 14px;
  line-height: 1.75;
  color: var(--color-muted);
}

@media (max-width: 1199px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .services__grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   4. Marquee
   ========================================================= */
.marquee {
  overflow: hidden;
  padding: 28px 0;
  background: var(--color-primary);
  color: #fff;
  user-select: none;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 70s linear infinite;
}

/* 服務項目跑馬燈：統一實心白字，項目間以金色圓點分隔 */
.marquee__text {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.marquee__dot {
  padding: 0 0.6em;
  color: var(--color-secondary-light);
  font-size: 0.6em;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* =========================================================
   5. Advantages
   ========================================================= */
.advantages__list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
}

.advantages {
  background:
    radial-gradient(circle at 12% 0%, rgba(166, 91, 42, 0.14) 0, transparent 45%),
    radial-gradient(circle at 92% 100%, rgba(130, 118, 81, 0.14) 0, transparent 45%),
    #f7ece2;
}

.advantage-card {
  grid-column: span 2;
  position: relative;
  padding: 36px 32px;
  background: #fff;
  border: 1px solid rgba(166, 91, 42, 0.12);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(4, 0, 0, 0.07);
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.advantage-card:nth-child(4),
.advantage-card:nth-child(5) {
  grid-column: span 3;
}

.advantage-card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--color-secondary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.advantage-card:hover {
  border-color: transparent;
  box-shadow: 0 18px 40px rgba(4, 0, 0, 0.12);
  transform: translateY(-6px);
}

.advantage-card:hover::after {
  transform: scaleX(1);
}

.advantage-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.advantage-card__icon-box {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(166, 91, 42, 0.32);
  transition: box-shadow 0.35s var(--ease);
}

/* 右下錯位金色框線襯底（同「關於設想」主圖手法），營造立體層次 */
.advantage-card__icon-box::after {
  content: "";
  position: absolute;
  inset: 8px -8px -8px 8px;
  border: 2px solid var(--color-secondary);
  border-radius: inherit;
  z-index: -1;
  transition: transform 0.35s var(--ease);
}

.advantage-card:hover .advantage-card__icon-box {
  box-shadow: 0 14px 26px rgba(166, 91, 42, 0.42);
}

.advantage-card:hover .advantage-card__icon {
  transform: scale(1.08);
}

.advantage-card:hover .advantage-card__icon-box::after {
  transform: translate(-4px, -4px);
}

.advantage-card__icon {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s var(--ease);
}

.advantage-card__index {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.advantage-card__label {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.advantage-card__num {
  font-family: var(--font-en);
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  color: var(--color-secondary);
}

.advantage-card__title {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.advantage-card__text {
  font-size: 15px;
  color: var(--color-muted);
}

@media (max-width: 991px) {
  .advantages__list {
    grid-template-columns: repeat(2, 1fr);
  }

  .advantage-card,
  .advantage-card:nth-child(4) {
    grid-column: span 1;
  }

  .advantage-card:nth-child(5) {
    grid-column: span 2;
  }
}

@media (max-width: 575px) {
  .advantages__list {
    grid-template-columns: 1fr;
  }

  .advantage-card:nth-child(5) {
    grid-column: span 1;
  }

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

/* =========================================================
   6. Process（一站式服務：左側步驟頁籤＋右側內容面板）
   參考客戶提供的兩張設計稿：深色側欄頁籤、主色作用中頁籤、
   襯線斜體大編號＋金色短線、圖示說明卡片、LINE 預約按鈕
   ========================================================= */
.process__board {
  display: grid;
  grid-template-columns: 300px 1fr;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px rgba(32, 18, 8, 0.12);
}

/* 左側深色頁籤欄：底部加主色斜紋點綴 */
.process__tabs {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px 16px 96px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, transparent 60%),
    #24201c;
}

.process__tabs::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: repeating-linear-gradient(-55deg, transparent 0 14px, rgba(166, 91, 42, 0.85) 14px 22px);
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 75%);
  mask-image: linear-gradient(90deg, transparent 20%, #000 75%);
  opacity: 0.7;
  pointer-events: none;
}

.process__tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.process__tab:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.process__tab:focus-visible {
  outline: 2px solid #f5c46e;
  outline-offset: 2px;
}

.process__tab--active,
.process__tab--active:hover {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 10px 22px rgba(166, 91, 42, 0.35);
}

.process__tab-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.process__tab-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.process__tab-step {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #f5c46e;
}

.process__tab--active .process__tab-step {
  color: rgba(255, 255, 255, 0.85);
}

.process__tab-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.process__tab-arrow {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.process__tab--active .process__tab-arrow {
  opacity: 1;
  transform: none;
}

/* 右側內容面板 */
.process__panels {
  display: flex;
  flex-direction: column;
  padding: 32px 36px 36px;
  background: linear-gradient(180deg, #fbf8f3 0%, #fff 100%);
}

.process__panel[hidden] {
  display: none;
}

.process__panel--active {
  animation: process-in 0.5s var(--ease) both;
}

@keyframes process-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 寬幅照片：依設計稿的橫幅構圖 */
.process__photo {
  margin: 0 0 28px;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 32 / 10;
  background: #e8e1d6;
}

.process__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.process__photo--01 .process__image {
  object-position: center 38%;
}

.process__photo--05 .process__image {
  object-position: center 45%;
}

/* 大編號（襯線斜體金色）＋直線分隔＋標題與金色短線 */
.process__panel-head {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin-bottom: 24px;
}

.process__num {
  flex-shrink: 0;
  padding-right: 28px;
  border-right: 1px solid rgba(143, 107, 46, 0.45);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 64px;
  font-style: italic;
  line-height: 1;
  color: var(--color-secondary);
}

.process__title {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 12px;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.35;
}

.process__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 2px;
  background: var(--color-secondary);
}

.process__text {
  color: var(--color-muted);
  line-height: 1.8;
}

.process__link {
  color: var(--color-primary);
  font-weight: 700;
  word-break: keep-all;
}

.process__link:hover {
  text-decoration: underline;
}

/* 三個說明卡片：圖示＋直線＋標題與說明 */
.process__details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.process__detail {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 16px;
  border-radius: 10px;
  background: #f3eee6;
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.process__detail:hover {
  background: #efe5d8;
  transform: translateY(-2px);
}

.process__detail-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding-right: 12px;
  box-sizing: content-box;
  border-right: 2px solid rgba(166, 91, 42, 0.5);
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.process__detail-title {
  margin-top: 0;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.process__detail-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-muted);
}

/* LINE 預約：面板底部，左側提示文字＋右側按鈕 */
.process__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: auto;
  padding-top: 28px;
}

.process__note {
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

.process__cta {
  min-height: 58px;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 18px;
  box-shadow: 0 10px 22px rgba(6, 199, 85, 0.28);
}

.process__line-icon {
  width: 26px;
  height: 26px;
  padding-right: 12px;
  margin-right: 4px;
  box-sizing: content-box;
  border-right: 1px solid rgba(255, 255, 255, 0.55);
  fill: currentColor;
}

.process__cta-arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease);
}

.process__cta:hover .process__cta-arrow {
  transform: translateX(4px);
}

@media (max-width: 1199px) {
  .process__board {
    grid-template-columns: 250px 1fr;
  }

  .process__panels {
    padding: 28px;
  }

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

/* 平板／手機：改為收合式（Accordion）——每個步驟標題下方直接展開該步驟內容
   以 display: contents 拆開頁籤列與面板容器，再用 order 讓「標題／內容」交錯排列 */
@media (max-width: 991px) {
  .process__board {
    display: flex;
    flex-direction: column;
    background: #fbf8f3;
  }

  .process__tabs,
  .process__panels {
    display: contents;
  }

  .process__tabs::after {
    display: none;
  }

  .process__tab:nth-child(1) { order: 1; }
  .process__tab:nth-child(2) { order: 3; }
  .process__tab:nth-child(3) { order: 5; }
  .process__tab:nth-child(4) { order: 7; }
  .process__tab:nth-child(5) { order: 9; }
  .process__panel:nth-child(1) { order: 2; }
  .process__panel:nth-child(2) { order: 4; }
  .process__panel:nth-child(3) { order: 6; }
  .process__panel:nth-child(4) { order: 8; }
  .process__panel:nth-child(5) { order: 10; }

  .process__actions {
    order: 11;
    margin-top: 0;
    padding: 24px 20px 28px;
  }

  /* 步驟標題列：深色底整列可點，作用中為主色 */
  .process__tab {
    gap: 14px;
    min-height: 68px;
    padding: 12px 18px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #24201c;
  }

  .process__tab:hover {
    background: #2f2a25;
  }

  .process__tab--active,
  .process__tab--active:hover {
    background: var(--color-primary);
    box-shadow: none;
  }

  .process__tab-icon {
    width: 28px;
    height: 28px;
  }

  .process__tab-title {
    font-size: 17px;
  }

  /* 右側箭頭改為展開指示：收合朝下、展開朝上 */
  .process__tab-arrow {
    opacity: 1;
    width: 20px;
    height: 20px;
    transform: rotate(90deg);
  }

  .process__tab--active .process__tab-arrow {
    transform: rotate(-90deg);
  }

  /* 展開／收合：以高度過渡做出往下延伸、往上縮起的效果（由 main.js 控制高度） */
  .process__panel {
    overflow: hidden;
    background: linear-gradient(180deg, #fbf8f3 0%, #fff 100%);
    transition: height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .process__panel--active {
    animation: none;
  }

  .process__panel-inner {
    padding: 22px 20px 26px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .process__panel--active .process__panel-inner {
    opacity: 1;
    transform: none;
  }

  .process__tab {
    transition: background-color 0.35s ease, color 0.35s ease;
  }

  .process__tab-arrow {
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .process__details {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .process__panel-inner {
    padding: 18px 16px 22px;
  }

  .process__photo {
    aspect-ratio: 16 / 9;
    margin-bottom: 20px;
  }

  /* 手機：編號與標題同列，說明文字改為整列寬度 */
  .process__panel-head {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 14px 16px;
    margin-bottom: 18px;
  }

  .process__panel-head > div {
    display: contents;
  }

  .process__panel-head .process__title {
    margin-bottom: 0;
  }

  .process__panel-head .process__text {
    grid-column: 1 / -1;
  }

  .process__num {
    padding-right: 14px;
    font-size: 38px;
  }

  .process__title {
    font-size: 20px;
    letter-spacing: 0.04em;
  }

  .process__details {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .process__detail {
    padding: 14px;
  }

  .process__actions {
    flex-direction: column;
    text-align: center;
  }

  .process__cta {
    width: 100%;
    max-width: 340px;
  }
}

/* =========================================================
   7. Cases
   ========================================================= */
.cases__filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.cases__filter {
  padding: 10px 24px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #fff;
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.cases__filter:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.cases__filter--active,
.cases__filter--active:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* 工程實績使用加寬容器，卡片不擁擠 */
.container--wide {
  max-width: 1680px;
  padding: 0 48px;
}

/* 案例列：桌機與手機皆為橫向滑動卡片（桌機一列 5 張、平板 3 張、手機約 1.5 張） */
.cases__slider {
  --case-gap: 24px;
  --case-per-view: 5;
}

.cases__grid {
  display: flex;
  gap: var(--case-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 0 24px;
  cursor: grab;
  user-select: none;
}

.cases__grid::-webkit-scrollbar {
  display: none;
}

/* 滑鼠拖曳中：暫停吸附與平滑捲動，放開後再吸附到卡片 */
.cases__grid--dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.cases__grid--dragging .case-card {
  pointer-events: none;
}

.case-card__image {
  -webkit-user-drag: none;
}

.case-card {
  flex: 0 0 calc((100% - var(--case-gap) * (var(--case-per-view) - 1)) / var(--case-per-view));
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

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

.cases__nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.cases__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  background: #fff;
  color: var(--color-primary);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), opacity 0.3s var(--ease);
}

.cases__arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cases__arrow:hover:not(:disabled) {
  background: var(--color-primary);
  color: #fff;
}

.cases__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

/* 篩選切換後才播放卡片進場動畫（避免與捲動淡入衝突） */
.cases__grid--filtered .case-card {
  animation: case-in 0.45s var(--ease) both;
}

.case-card--hidden {
  display: none;
}

.case-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.case-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.case-card:hover .case-card__image {
  transform: scale(1.05);
}

/* 分類標籤：左上角金色 */
.case-card__tag {
  position: absolute;
  left: 0;
  top: 0;
  padding: 6px 14px;
  border-radius: 0 0 var(--radius) 0;
  background: var(--color-secondary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* 案例名稱：主色底白字置中，與白色區塊底色區隔 */
.case-card__title {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 16px 18px;
  background: var(--color-primary);
  color: #fff;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 0.04em;
  transition: background-color 0.3s var(--ease);
}

.case-card:hover .case-card__title {
  background: var(--color-primary-dark);
}

/* 整張卡片可點擊開啟相簿（按鈕以 ::after 撐滿卡片） */
.case-card {
  position: relative;
  cursor: pointer;
}

.case-card__open {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.case-card__open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}

.case-card__open:focus-visible {
  outline: none;
}

.case-card:has(.case-card__open:focus-visible) {
  outline: 3px solid var(--color-secondary);
  outline-offset: 3px;
}

/* 相片張數：右上角 */
.case-card__count {
  position: absolute;
  right: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(32, 18, 8, 0.62);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  backdrop-filter: blur(2px);
  transition: background-color 0.3s var(--ease);
}

.case-card__count-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.case-card:hover .case-card__count {
  background: var(--color-secondary);
}

/* =========================================================
   虛擬實境（實際尺寸沉浸式空間）簡介區塊
   ========================================================= */
.immersive {
  position: relative;
  overflow: hidden;
  /* 淺米色底：與前方白色（工程實績）、後方灰色（常見問題）區隔 */
  background:
    radial-gradient(circle at 90% 10%, rgba(179, 167, 127, 0.22), transparent 45%),
    linear-gradient(180deg, #f6f3ec 0%, #efeae0 100%);
}

/* 左側直式影片（9:16）固定寬度、右側文案限制行長，整組置中 */
.immersive__inner {
  display: grid;
  grid-template-columns: 380px minmax(0, 620px);
  justify-content: center;
  gap: 96px;
  align-items: center;
}

.immersive__media {
  width: 100%;
}

/* 大圖外框：右下錯位金色框線襯底，比照關於設想的立體感 */
.immersive__frame {
  position: relative;
  padding: 0 20px 20px 0;
  margin-bottom: 8px;
}

.immersive__frame::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 20px;
  right: 0;
  bottom: 0;
  border: 2px solid var(--color-secondary);
  border-radius: var(--radius);
  background: rgba(179, 167, 127, 0.14);
}

/* 影片區：直式 9:16，封面圖先顯示，影片接近畫面才載入播放 */
.immersive__stage {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 9 / 16;
  background: #2a2622;
  box-shadow: 0 18px 40px rgba(122, 63, 26, 0.22);
}

.immersive__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

/* 圖說放左上（影片底部已有內建字幕） */
.immersive__caption {
  position: absolute;
  top: 0;
  left: 0;
  padding: 8px 16px;
  border-radius: 0 0 var(--radius) 0;
  background: var(--color-secondary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  pointer-events: none;
}

/* 暫停／播放按鈕（右下角） */
.immersive__toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(20, 16, 12, 0.55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.immersive__toggle:hover {
  background: var(--color-primary);
  transform: scale(1.06);
}

.immersive__toggle:focus-visible {
  outline: 3px solid var(--color-secondary-light);
  outline-offset: 2px;
}

.immersive__toggle-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.immersive__toggle-icon--play {
  display: none;
  fill: currentColor;
}

.immersive__toggle--paused .immersive__toggle-icon--pause {
  display: none;
}

.immersive__toggle--paused .immersive__toggle-icon--play {
  display: block;
}

.immersive__lead {
  line-height: 1.9;
}

.immersive__lead strong {
  color: var(--color-primary-dark);
}

.immersive__features {
  display: grid;
  gap: 16px;
  margin: 28px 0 24px;
}

/* 特色卡片：白色實心卡片＋左側金色邊線，浮在米色底上 */
.immersive__feature {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border-left: 4px solid var(--color-secondary);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-text);
  box-shadow: 0 8px 20px rgba(122, 63, 26, 0.1);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.immersive__feature:hover {
  transform: translateX(4px);
  box-shadow: 0 12px 28px rgba(122, 63, 26, 0.18);
}

.immersive__feature-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-en);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.immersive__feature-title {
  color: var(--color-primary-dark);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.immersive__feature-text {
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 15px;
  line-height: 1.7;
}

.immersive__note {
  margin-bottom: 28px;
  color: var(--color-muted);
  font-size: 14px;
}

.immersive__button:hover {
  background: var(--color-secondary);
}

.immersive__button-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1199px) {
  .immersive__inner {
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 64px;
  }
}

@media (max-width: 991px) {
  .immersive__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .immersive__body {
    order: -1;
  }

  /* 單欄時影片置中、限制寬度，避免直式影片過高 */
  .immersive__media {
    max-width: 340px;
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  .immersive__media {
    max-width: 300px;
  }

  .immersive__toggle {
    right: 10px;
    bottom: 10px;
    width: 40px;
    height: 40px;
  }

  .immersive__frame {
    padding: 0 14px 14px 0;
  }

  .immersive__frame::before {
    top: 14px;
    left: 14px;
  }

  .immersive__feature {
    padding: 14px 16px;
  }

  .immersive__feature-title {
    font-size: 17px;
  }

  .immersive__button {
    width: 100%;
    max-width: 320px;
  }
}

/* =========================================================
   工程實績相簿（Lightbox 幻燈片）
   ========================================================= */
body.is-lightbox-open {
  overflow: hidden;
}

.lightbox {
  --lightbox-duration: 4000ms;
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.lightbox[hidden] {
  display: none;
}

.lightbox--open {
  opacity: 1;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 17, 10, 0.97);
}

.lightbox__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  height: 100%;
  max-height: 900px;
  color: #fff;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.35s var(--ease);
}

.lightbox--open .lightbox__dialog {
  transform: none;
}

.lightbox__header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
}

.lightbox__title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.lightbox__counter {
  color: var(--color-secondary-light);
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.lightbox__tools {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.lightbox__play,
.lightbox__close,
.lightbox__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.lightbox__play,
.lightbox__close {
  width: 44px;
  height: 44px;
}

.lightbox__play:hover,
.lightbox__close:hover,
.lightbox__arrow:hover {
  border-color: var(--color-secondary);
  background: var(--color-secondary);
}

.lightbox__icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lightbox__icon--play {
  fill: currentColor;
  stroke-width: 1.5;
}

.lightbox__icon--play,
.lightbox--paused .lightbox__icon--pause {
  display: none;
}

.lightbox--paused .lightbox__icon--play {
  display: block;
}

.lightbox__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

/* 兩層圖片疊放，切換時交叉淡入淡出 */
.lightbox__image {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  -webkit-user-drag: none;
  transition: opacity 0.8s ease;
}

.lightbox__image--active {
  opacity: 1;
}

.lightbox__arrow {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 52px;
  margin-top: -26px;
  background: rgba(26, 17, 10, 0.5);
}

.lightbox__arrow--prev {
  left: 16px;
}

.lightbox__arrow--next {
  right: 16px;
}

/* 自動播放進度條 */
.lightbox__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
}

.lightbox__progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary-light));
  transform: scaleX(0);
  transform-origin: left center;
}

.lightbox__progress-bar--run {
  animation: lightbox-progress var(--lightbox-duration) linear forwards;
}

.lightbox--paused .lightbox__progress-bar {
  animation: none;
  transform: scaleX(0);
}

@keyframes lightbox-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* 下方縮圖列 */
.lightbox__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding: 2px 2px 6px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.lightbox__thumb {
  flex: 0 0 auto;
}

.lightbox__thumb-button {
  display: block;
  width: 96px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  background: none;
  overflow: hidden;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.25s var(--ease), border-color 0.25s var(--ease);
}

.lightbox__thumb-button:hover {
  opacity: 0.85;
}

.lightbox__thumb-button--active {
  border-color: var(--color-secondary-light);
  opacity: 1;
}

.lightbox__thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 767px) {
  .lightbox {
    padding: 12px 0 16px;
  }

  .lightbox__header {
    gap: 10px;
    padding: 0 12px 10px;
  }

  .lightbox__title {
    font-size: 16px;
  }

  .lightbox__counter {
    font-size: 13px;
  }

  .lightbox__play,
  .lightbox__close {
    width: 40px;
    height: 40px;
  }

  .lightbox__stage {
    border-radius: 0;
  }

  .lightbox__arrow {
    width: 40px;
    height: 40px;
    margin-top: -20px;
  }

  .lightbox__arrow--prev {
    left: 8px;
  }

  .lightbox__arrow--next {
    right: 8px;
  }

  .lightbox__thumbs {
    margin-top: 10px;
    padding: 2px 12px 6px;
  }

  .lightbox__thumb-button {
    width: 64px;
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox__dialog,
  .lightbox__image {
    transition: none;
  }
}

.cases__empty {
  text-align: center;
  color: var(--color-muted);
  padding: 40px 0;
}

@keyframes case-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1199px) {
  .container--wide {
    padding: 0 24px;
  }

  .cases__slider {
    --case-per-view: 3;
  }
}

@media (max-width: 767px) {
  .container--wide {
    padding: 0 16px;
  }
}

@media (max-width: 575px) {
  .cases__filter {
    padding: 8px 18px;
    font-size: 14px;
  }
}

/* =========================================================
   8. FAQ (Accordion)
   ========================================================= */
.faq__inner {
  max-width: 920px;
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq__item {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.faq__item--open {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.faq__heading {
  font-size: inherit;
}

.faq__question {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 22px 24px;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
}

.faq__q,
.faq__a {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 15px;
}

.faq__q {
  background: var(--color-primary);
  color: #fff;
}

.faq__a {
  float: left;
  margin-right: 16px;
  background: rgba(130, 118, 81, 0.14);
  color: var(--color-secondary);
}

.faq__question-text {
  flex: 1;
}

.faq__icon {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transform: translateY(-50%);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

.faq__icon::after {
  transform: translateY(-50%) rotate(90deg);
}

.faq__item--open .faq__icon::after {
  transform: translateY(-50%) rotate(0deg);
  opacity: 0;
}

.faq__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}

.faq__item--open .faq__answer {
  grid-template-rows: 1fr;
}

.faq__answer-inner {
  overflow: hidden;
}

.faq__answer-text {
  padding: 0 24px 24px;
  margin: 0 24px;
  padding-left: 0;
  padding-right: 0;
  padding-top: 18px;
  border-top: 1px dashed var(--color-border);
  color: #2c2c2c;
  overflow: hidden;
}

@media (max-width: 575px) {
  .faq__question {
    padding: 18px 16px;
    gap: 12px;
    font-size: 15px;
  }

  .faq__answer-text {
    margin: 0 16px;
    font-size: 15px;
  }

  .faq__q,
  .faq__a {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
}

/* =========================================================
   9. Contact
   ========================================================= */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}

.contact__info {
  display: flex;
  flex-direction: column;
  padding: 44px 40px;
  background: var(--color-gray-bg);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-primary);
}

.contact__company {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.contact__list {
  margin-bottom: 32px;
}

.contact__row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}

.contact__term {
  font-weight: 700;
  color: var(--color-secondary);
}

.contact__desc {
  word-break: break-word;
}

.contact__link {
  color: var(--color-primary);
  font-weight: 700;
}

.contact__link:hover {
  text-decoration: underline;
}

.contact__map {
  align-self: flex-start;
  margin-top: auto;
}

.contact__actions {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-card {
  position: relative;
  flex: 1;
  padding: 36px 40px;
  border-radius: var(--radius);
  color: #fff;
  overflow: hidden;
}

.contact-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 30px solid rgba(255, 255, 255, 0.08);
}

.contact-card--phone {
  background: var(--color-primary);
}

.contact-card--line {
  background: var(--color-secondary);
}

.contact-card__en {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  opacity: 0.8;
}

.contact-card__title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.05em;
  margin: 6px 0 8px;
}

.contact-card__value {
  font-family: var(--font-en);
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.contact-card__text {
  font-size: 15px;
  opacity: 0.92;
  margin-bottom: 22px;
}

.contact-card__btn {
  position: relative;
  z-index: 1;
}

@media (max-width: 991px) {
  .contact__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .contact__info,
  .contact-card {
    padding: 28px 22px;
  }

  .contact__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .contact__map,
  .contact-card__btn {
    width: 100%;
  }
}

/* =========================================================
   Route 交通指引（地圖上方：路線 A / B 擇一，點卡片開幻燈片看完整 3 張）
   ========================================================= */
.route__ways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  max-width: 1040px;
  margin: 0 auto;
}

/* 整張卡片可點（標題按鈕以 ::after 撐滿卡片） */
.route-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

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

.route-card__media {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.route-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.route-card:hover .route-card__image {
  transform: scale(1.04);
}

.route-card__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--color-primary);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(32, 18, 8, 0.25);
}

/* 右上張數提示（比照工程實績卡片） */
.route-card__count {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: rgba(20, 16, 12, 0.6);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.route-card__count-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px 26px 24px;
  border-top: 4px solid var(--color-primary);
}

.route-card__title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.route-card__open {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.route-card__open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.route-card__open:focus-visible {
  outline: none;
}

.route-card:has(.route-card__open:focus-visible) {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

.route-card__text {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-muted);
}

.route-card__text strong {
  color: var(--color-text);
}

.route-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
}

.route-card__more-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease);
}

.route-card:hover .route-card__more-icon {
  transform: translateX(4px);
}

.route__actions {
  display: flex;
  justify-content: center;
  margin-top: 44px;
}

@media (max-width: 991px) {
  .route__ways {
    gap: 20px;
  }

  .route-card__body {
    padding: 18px 20px 20px;
  }

  .route-card__title {
    font-size: 20px;
  }
}

@media (max-width: 767px) {
  .route__ways {
    grid-template-columns: 1fr;
  }

  .route-card__badge,
  .route-card__count {
    top: 12px;
    font-size: 13px;
  }

  .route-card__badge {
    left: 12px;
  }

  .route-card__count {
    right: 12px;
  }

  .route__actions {
    margin-top: 32px;
  }

  .route__button {
    width: 100%;
    max-width: 360px;
  }
}

/* =========================================================
   Google Map（CTA 上方滿版長條，無左右間距）
   ========================================================= */
.map {
  line-height: 0;
  background: var(--color-gray-bg);
}

.map__frame {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}

@media (max-width: 767px) {
  .map__frame {
    height: 280px;
  }
}

/* =========================================================
   Pre-Footer CTA
   ========================================================= */
.cta {
  position: relative;
  padding: 110px 0;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: var(--color-dark);
}

.cta__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta__overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 0, 0, 0.78);
}

.cta__content {
  position: relative;
  z-index: 1;
}

.cta__en {
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--color-secondary-light);
  margin-bottom: 14px;
}

.cta__title {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.cta__text {
  max-width: 680px;
  margin: 0 auto 36px;
  color: rgba(255, 255, 255, 0.88);
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

@media (max-width: 767px) {
  .cta {
    padding: 80px 0;
  }

  .cta__actions .button {
    width: 100%;
  }
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

.footer__main {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-top: 72px;
  padding-bottom: 64px;
}

.footer__logo-img {
  height: 38px;
  width: auto;
  margin-bottom: 18px;
}

.footer__slogan {
  font-size: 14px;
  color: var(--color-muted);
  margin-bottom: 20px;
}

.footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-line);
  color: #fff;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 800;
  transition: transform 0.3s var(--ease);
}

.footer__social:hover {
  transform: translateY(-3px);
}

.footer__title {
  position: relative;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.footer__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  background: var(--color-primary);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__item {
  font-size: 14px;
  line-height: 1.7;
}

.footer__link {
  transition: color 0.3s var(--ease);
}

.footer__link:hover {
  color: var(--color-primary);
}

.footer__list--contact .footer__item {
  display: flex;
  flex-direction: column;
}

.footer__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-secondary);
  letter-spacing: 0.08em;
}

.footer__bottom {
  padding: 16px;
  background: var(--color-primary);
  color: #fff;
  text-align: center;
}

.footer__copyright {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.04em;
}

@media (max-width: 991px) {
  .footer__main {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .footer__main {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 56px;
    padding-bottom: 96px;
  }
}

/* =========================================================
   Floating Action Buttons
   ========================================================= */
.fab {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fab__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(4, 0, 0, 0.18);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), opacity 0.35s var(--ease), visibility 0.35s;
}

.fab__btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(4, 0, 0, 0.24);
}

.fab__btn--line {
  background: var(--color-line);
  color: #fff;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.fab__btn--contact {
  background: var(--color-secondary);
  color: #fff;
}

.fab__text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  letter-spacing: 0.06em;
}

.fab__btn--top {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

.fab__btn--top.fab__btn--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.fab__btn--top.fab__btn--visible:hover {
  transform: translateY(-4px);
}

@media (max-width: 767px) {
  .fab {
    right: 14px;
    bottom: 18px;
    gap: 10px;
  }

  .fab__btn {
    width: 48px;
    height: 48px;
  }

  .fab__btn--line {
    font-size: 12px;
  }

  .fab__text {
    font-size: 12px;
  }
}

/* =========================================================
   Mobile Services Grid（手機版八大工種：一列 2 張排列，不輪播）
   圖片改為正方形裁切；敘述隱藏，只留編號＋標題＋英文
   ========================================================= */
@media (max-width: 767px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .service-card__media {
    aspect-ratio: 1 / 1;
  }

  .service-card__body {
    padding: 12px 10px 14px;
    text-align: center;
  }

  .service-card__title {
    font-size: 16px;
  }

  .service-card__en {
    font-size: 10px;
    margin: 2px 0 0;
  }

  .service-card__text {
    display: none;
  }

  .service-card__num {
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    font-size: 13px;
  }

  .service-card:hover {
    transform: none;
  }
}

/* 圖片裁切定位（加在 .service-card__image 上，預設置中） */
.service-card__image--top {
  object-position: center top;
}

.service-card__image--bottom {
  object-position: center bottom;
}

.service-card__image--left {
  object-position: left center;
}

.service-card__image--right {
  object-position: right center;
}

/* =========================================================
   Mobile Swipe Cards（手機版卡片左右滑動，顯示約 1.5 張）
   套用：五大優勢 / 工程實績
   ========================================================= */
@media (max-width: 767px) {
  .advantages__list,
  .cases__grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* 讓卡片滑出至螢幕右緣，提示可繼續滑動 */
    margin: 0 -16px;
    padding: 6px 16px 24px;
  }

  .advantages__list::-webkit-scrollbar,
  .cases__grid::-webkit-scrollbar {
    display: none;
  }

  /* 卡片寬度 ≈ (可視寬 - 間距) / 1.5 */
  .advantage-card,
  .advantage-card:nth-child(4),
  .advantage-card:nth-child(5),
  .case-card {
    flex: 0 0 62%;
    max-width: 280px;
    scroll-snap-align: start;
  }

  /* 卡片高度一致 */
  .case-card {
    align-self: stretch;
  }

  .advantage-card {
    padding: 26px 20px;
  }

  .advantage-card__icon-box {
    width: 60px;
    height: 60px;
    border-radius: 16px;
  }

  .advantage-card__icon {
    width: 32px;
    height: 32px;
  }

  .advantage-card__num {
    font-size: 40px;
  }

  .advantage-card__title {
    font-size: 17px;
  }

  .advantage-card__text {
    font-size: 14px;
  }

  .case-card__title {
    padding: 14px 16px 16px;
    font-size: 17px;
  }

  /* 滑動時不做上浮 Hover，避免觸控殘留狀態 */
  .advantage-card:hover,
  .case-card:hover {
    transform: none;
  }

  /* 手機以手指滑動，隱藏左右箭頭 */
  .cases__nav {
    display: none;
  }

  /* 篩選按鈕列也改為可橫向滑動，維持單行 */
  .cases__filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px 24px;
    padding: 0 16px;
  }

  .cases__filters::-webkit-scrollbar {
    display: none;
  }

  .cases__filter {
    flex-shrink: 0;
  }
}

/* =========================================================
   Scroll Reveal（捲動淡入，桌機與手機皆適用）
   .reveal 由 main.js 加上，未載入 JS 時內容照常顯示
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}

.reveal--left {
  transform: translateX(-48px);
}

.reveal--right {
  transform: translateX(48px);
}

.reveal--zoom {
  transform: scale(0.94);
}

.reveal--visible {
  opacity: 1;
  transform: none;
}

/* 同一排卡片依序淡入 */
.reveal--d1 { transition-delay: 0.1s; }
.reveal--d2 { transition-delay: 0.2s; }
.reveal--d3 { transition-delay: 0.3s; }

@media (max-width: 767px) {
  .reveal {
    transform: translateY(28px);
    transition-duration: 0.65s;
  }

  /* 手機版左右滑入改為由下往上，避免水平溢出 */
  .reveal--left,
  .reveal--right {
    transform: translateY(28px);
  }

  .reveal--visible {
    transform: none;
  }

  /* 手機單欄排列，不需要錯開延遲 */
  .reveal--d1,
  .reveal--d2,
  .reveal--d3 {
    transition-delay: 0s;
  }
}

/* =========================================================
   Motion Effects（生動化特效）
   ========================================================= */

/* ---------- 1. Header 頂部閱讀進度線 ---------- */
.header__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* ---------- 2. 按鈕：Hover 光澤掃過 ---------- */
.button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  z-index: 1;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-22deg);
  pointer-events: none;
}

.button:hover::after {
  animation: btn-shine 0.75s var(--ease);
}

/* ---------- 3. 重點按鈕：呼吸放大縮小＋外擴光圈＋定時光澤 ---------- */
.button--pulse {
  animation: btn-pulse 2.4s ease-in-out infinite;
}

.button--line.button--pulse {
  --pulse-color: 6, 199, 85;
}

.button--white.button--pulse,
.button--hero.button--pulse {
  --pulse-color: 255, 255, 255;
}

.button--pulse::after {
  animation: btn-shine 3.6s var(--ease) 1.2s infinite;
}

/* Hover 時停止呼吸，改用原本的上浮效果 */
.button--pulse:hover {
  animation: none;
}

.header__cta {
  position: relative;
  animation: btn-pulse 2.4s ease-in-out infinite;
  --pulse-color: 45, 133, 146;
}

.header__cta:hover {
  animation: none;
}

@keyframes btn-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(var(--pulse-color, 45, 133, 146), 0.5);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 12px rgba(var(--pulse-color, 45, 133, 146), 0);
  }
}

@keyframes btn-shine {
  0% {
    left: -75%;
  }
  40%, 100% {
    left: 130%;
  }
}

/* ---------- 4. 懸浮 LINE 按鈕：雷達光圈 ---------- */
.fab__btn--line {
  position: relative;
}

.fab__btn--line::before,
.fab__btn--line::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--color-line);
  animation: fab-ripple 2.4s ease-out infinite;
  pointer-events: none;
}

.fab__btn--line::after {
  animation-delay: 1.2s;
}

@keyframes fab-ripple {
  from {
    transform: scale(1);
    opacity: 0.7;
  }
  to {
    transform: scale(1.7);
    opacity: 0;
  }
}

/* ---------- 5. 雙語標題：英文前導線流光 ---------- */
.section-heading__en::before {
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary) 35%, #f0c79c 50%, var(--color-primary) 65%, var(--color-primary) 100%);
  background-size: 300% 100%;
  animation: line-flow 2.8s linear infinite;
}

/* 置中標題補上右側對稱線 */
.section-heading:not(.section-heading--left) .section-heading__en::after {
  content: "";
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary) 35%, #f0c79c 50%, var(--color-primary) 65%, var(--color-primary) 100%);
  background-size: 300% 100%;
  animation: line-flow 2.8s linear infinite reverse;
}

/* 區塊標題下方：淡入時畫出的底線 */
.section-heading__title {
  position: relative;
}

.section-heading:not(.section-heading--left) .section-heading__title::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: 16px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  transform-origin: center;
  animation: line-grow 1s var(--ease) both;
}

/* 尚未淡入時底線維持收合，淡入後才畫出 */
.reveal .section-heading__title::after {
  animation: none;
  transform: scaleX(0);
}

.reveal--visible .section-heading__title::after {
  animation: line-grow 1s var(--ease) 0.3s both;
}

@keyframes line-flow {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@keyframes line-grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* ---------- 6. Hero：分頁點自動輪播進度條 ---------- */
.hero__dot {
  position: relative;
  overflow: hidden;
}

.hero__dot--active {
  background: rgba(255, 255, 255, 0.35);
}

.hero__dot--active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--color-primary);
  transform-origin: left;
  animation: dot-progress 6s linear both;
}

.hero--paused .hero__dot--active::after {
  animation-play-state: paused;
}

@keyframes dot-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* ---------- 7. Hero：SCROLL 往下滑動指示線 ---------- */
.hero__scroll {
  position: absolute;
  right: 40px;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.hero__scroll-text {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  writing-mode: vertical-rl;
}

.hero__scroll-line {
  position: relative;
  width: 1px;
  height: 72px;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.hero__scroll-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 40%;
  background: #fff;
  animation: scroll-run 1.8s var(--ease) infinite;
}

@keyframes scroll-run {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(260%);
  }
}

@media (max-width: 767px) {
  .hero__scroll {
    display: none;
  }
}

/* ---------- 9. 卡片 Hover：外框跑線（八大工種） ---------- */
.service-card::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background:
    linear-gradient(var(--color-primary), var(--color-primary)) left top / 0 2px no-repeat,
    linear-gradient(var(--color-primary), var(--color-primary)) right top / 2px 0 no-repeat,
    linear-gradient(var(--color-primary), var(--color-primary)) right bottom / 0 2px no-repeat,
    linear-gradient(var(--color-primary), var(--color-primary)) left bottom / 2px 0 no-repeat;
  transition: background-size 0.25s linear;
}

/* 依序畫出：上 → 右 → 下 → 左 */
.service-card:hover::after {
  background-size: 100% 2px, 2px 100%, 100% 2px, 2px 100%;
  animation: border-draw 1s linear both;
}

@keyframes border-draw {
  0% {
    background-size: 0 2px, 2px 0, 0 2px, 2px 0;
  }
  25% {
    background-size: 100% 2px, 2px 0, 0 2px, 2px 0;
  }
  50% {
    background-size: 100% 2px, 2px 100%, 0 2px, 2px 0;
  }
  75% {
    background-size: 100% 2px, 2px 100%, 100% 2px, 2px 0;
  }
  100% {
    background-size: 100% 2px, 2px 100%, 100% 2px, 2px 100%;
  }
}

/* ---------- 10. 五大優勢：Icon 色塊輕微漂浮 ---------- */
.advantage-card__icon {
  animation: icon-float 3.2s ease-in-out infinite;
}

.advantage-card:nth-child(2) .advantage-card__icon { animation-delay: 0.4s; }
.advantage-card:nth-child(3) .advantage-card__icon { animation-delay: 0.8s; }
.advantage-card:nth-child(4) .advantage-card__icon { animation-delay: 1.2s; }
.advantage-card:nth-child(5) .advantage-card__icon { animation-delay: 1.6s; }

@keyframes icon-float {
  0%, 100% {
    transform: translateY(2px);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* ---------- 11. Pre-Footer CTA：背景緩慢推近 ---------- */
.cta__bg {
  animation: cta-zoom 18s ease-in-out infinite alternate;
}

@keyframes cta-zoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.12);
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .marquee__track {
    animation: none;
  }
}

/* Hero 小螢幕手機（≤374px）：須放在手機版規則之後，確保第一行標題放得下 */
@media (max-width: 374px) {
  .hero__title {
    font-size: 26px;
    letter-spacing: 0.02em;
  }
}
