/* =============================================================================
   about.css — 關於我們
   內容依 docs/關於我們_官網行銷文案.md：Banner → 品牌故事 → 品牌核心與服務 →
   經驗與實績。以文字為主的編輯式版面，不做產品頁式的卡片、功能列表或頁內 CTA。
   字級、眉標與導言一律使用元件庫（ds-title-*、ds-eyebrow、ds-lead），本檔只負責
   版面、間距與圖片；區塊以白底／surface-inner 交替，深色只留給頁尾。
   內容預設全部可見；js/about.js 只在 GSAP 載入且未偏好減少動態時才於 <body>
   加上 .has-motion，再隱藏起始畫格交給動畫揭露。
   ============================================================================= */

.about-page {
  --ds-font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --about-section-space: clamp(var(--ds-space-3xl), 9vw, var(--ds-space-5xl));
  --about-gutter: clamp(32px, 8vw, 64px);
  font-family: var(--ds-font-sans);
  background: var(--ds-color-page);
  overflow-x: clip;
}

/* 只作用於主內容且權重為 0：頁首／頁尾 logo 尺寸由共用元件決定 */
:where(.about-page main img) { height: auto; }

.about-container {
  width: min(100% - var(--about-gutter), var(--ds-container-max));
  margin-inline: auto;
}

/* 中文標題以標點分句：後半句整段換行，避免在詞語中間斷開 */
.about-phrase { display: inline-block; }

/* =============================================================================
   1. Banner — 滿版圖片，文字疊在左側白色階梯上
   ============================================================================= */
.about-banner {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(560px, 92vh, 880px);
  padding-block: calc(var(--ds-navbar-height) + var(--ds-space-2xl)) clamp(var(--ds-space-3xl), 8vw, var(--ds-space-4xl));
  overflow: hidden;
  isolation: isolate;
}

.about-banner__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  margin: 0;
  background: var(--ds-color-surface-muted);
}

/* 左側淡白漸層確保深色文字可讀；頂部淡白讓透明頁首的導覽保持清楚；底部淡出到頁面底色，接上下一區 */
.about-banner__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, .85) 0%, transparent 18%),
    linear-gradient(to top, var(--ds-color-page) 0%, transparent 22%),
    linear-gradient(90deg, rgba(255, 255, 255, .92) 0%, rgba(255, 255, 255, .78) 38%, rgba(255, 255, 255, .2) 62%, transparent 80%);
}

.about-page .about-banner__image {
  position: absolute;
  inset: -8% 0 auto;
  width: 100%;
  height: 116%;
  object-fit: cover;
  object-position: 30% 55%;
}

.about-banner__content { position: relative; }

.about-banner__eyebrow { color: var(--ds-color-secondary); }

.about-banner__title { margin-top: var(--ds-space-md); }

.about-banner__title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--ds-color-primary), var(--ds-color-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.about-mask { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.about-mask__line { display: block; }

.about-banner__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--ds-space-2xl);
  margin-top: var(--ds-space-lg);
}

.about-banner__lead { max-width: 32em; }

.about-banner__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ds-space-sm);
  color: var(--ds-color-text-primary);
  font-size: var(--ds-text-caption-size);
  line-height: var(--ds-text-caption-line);
  font-weight: var(--ds-weight-semibold);
  letter-spacing: var(--ds-tracking-wide);
  writing-mode: vertical-rl;
}

.about-banner__scroll-line {
  position: relative;
  width: 1px;
  height: 48px;
  overflow: hidden;
  background: color-mix(in srgb, var(--ds-color-text-primary) 25%, transparent);
}

.about-banner__scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ds-color-secondary);
  animation: about-scroll-cue 2.2s var(--ds-ease) infinite;
}

@keyframes about-scroll-cue {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

body.has-motion [data-hero-in] { opacity: 0; }

@media (width <= 768px) {
  .about-banner { min-height: clamp(520px, 88vh, 720px); }
  .about-banner__scroll { display: none; }
  /* 窄螢幕文字佔滿寬度，改為整片淡白覆蓋 */
  .about-banner__media::after {
    background:
      linear-gradient(to bottom, rgba(255, 255, 255, .85) 0%, transparent 18%),
      linear-gradient(to top, var(--ds-color-page) 0%, transparent 20%),
      linear-gradient(180deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .85) 55%, rgba(255, 255, 255, .9) 100%);
  }
}

/* =============================================================================
   2. 品牌故事 — 左側標題固定，右側長文與照片
   ============================================================================= */
.about-story { padding-block: var(--about-section-space); }

.about-story__layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(var(--ds-space-2xl), 6vw, var(--ds-space-4xl));
  align-items: start;
}

.about-story__aside {
  position: sticky;
  top: calc(var(--ds-navbar-height) + var(--ds-space-2xl));
}

.about-story__title { margin-top: var(--ds-space-sm); }

.about-story__body > p + p { margin-top: var(--ds-space-md); }

.about-story__gallery {
  position: relative;
  margin-block: var(--ds-space-2xl) clamp(var(--ds-space-3xl), 7vw, var(--ds-space-4xl));
}

.about-story__photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--ds-radius-lg);
  background: var(--ds-color-surface-muted);
}

.about-story__photo--wide { aspect-ratio: 16 / 10; width: 86%; }

.about-story__photo--inset {
  position: absolute;
  right: 0;
  bottom: clamp(-72px, -5vw, -40px);
  width: 44%;
  aspect-ratio: 4 / 3;
  border: 6px solid var(--ds-color-page);
  box-shadow: var(--ds-shadow-panel);
}

.about-page .about-story__photo img {
  position: absolute;
  inset: -8% 0 auto;
  width: 100%;
  height: 116%;
  object-fit: cover;
}

@media (width <= 1024px) {
  .about-story__layout { grid-template-columns: 1fr; }
  .about-story__aside { position: static; }
}

/* =============================================================================
   3. 品牌核心與服務 — 理念＋三個服務方向
   ============================================================================= */
.about-philosophy {
  background: var(--ds-color-surface-inner);
  padding-block: var(--about-section-space);
}

.about-philosophy__title { margin-top: var(--ds-space-sm); }

.about-belief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--ds-space-lg) clamp(var(--ds-space-2xl), 6vw, var(--ds-space-4xl));
  align-items: start;
  margin-top: clamp(var(--ds-space-2xl), 5vw, var(--ds-space-3xl));
}

.about-belief__statement { text-wrap: balance; }

.about-manifesto__char { color: var(--ds-color-surface-strong); }

.about-belief__text p + p { margin-top: var(--ds-space-md); }

.about-pillars {
  margin: clamp(var(--ds-space-2xl), 5vw, var(--ds-space-3xl)) 0 0;
  padding: 0;
  list-style: none;
}

.about-pillar {
  position: relative;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1.2fr);
  gap: var(--ds-space-md) clamp(var(--ds-space-xl), 4vw, var(--ds-space-2xl));
  align-items: start;
  padding-block: var(--ds-space-xl);
  border-top: var(--ds-border-width) solid var(--ds-color-border);
}

.about-pillar:last-child { border-bottom: var(--ds-border-width) solid var(--ds-color-border); }

/* 捲動進場時由左向右畫出的上緣色線 */
.about-pillar::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--ds-color-primary), transparent 60%);
  transform-origin: left center;
  transform: scaleX(var(--about-pillar-line, 1));
}

.about-pillar__num {
  color: var(--ds-color-secondary);
  font-size: var(--ds-text-headline-md-size);
  line-height: var(--ds-text-headline-md-line);
  font-weight: var(--ds-weight-semibold);
  font-variant-numeric: tabular-nums;
}

.about-pillar__title { display: grid; gap: var(--ds-space-xxs); }

.about-pillar__name { color: var(--ds-color-secondary); }

@media (width <= 1024px) {
  .about-belief { grid-template-columns: 1fr; }
  .about-pillar { grid-template-columns: 3rem minmax(0, 1fr); }
  .about-pillar__text { grid-column: 2; }
}

@media (width <= 768px) {
  .about-pillar { grid-template-columns: 1fr; gap: var(--ds-space-sm); }
  .about-pillar__text { grid-column: auto; }
}

/* =============================================================================
   4. 經驗與實績 — 三組數字與結語，作為頁面收尾
   ============================================================================= */
.about-record { padding-block: var(--about-section-space); }

.about-record__title { margin-top: var(--ds-space-sm); }

.about-figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: clamp(var(--ds-space-2xl), 5vw, var(--ds-space-3xl)) 0 0;
  border-top: var(--ds-border-width) solid var(--ds-color-border);
}

.about-figure {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: var(--ds-space-xs);
  padding: var(--ds-space-xl) clamp(var(--ds-space-md), 3vw, var(--ds-space-2xl)) 0;
}

.about-figure:first-child { padding-left: 0; }

.about-figure + .about-figure { border-left: var(--ds-border-width) solid var(--ds-color-border); }

.about-figure__label { color: var(--ds-color-text-secondary); }

.about-figure__value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--ds-space-xxs);
  margin: 0;
}

/* 數字沿用 Marketing hero 字級（DESIGN.md 最大層級），不另設更大的展示字級 */
.about-figure__number {
  font-size: var(--ds-text-display-hero-size);
  line-height: var(--ds-text-display-hero-line);
  font-weight: var(--ds-weight-bold);
  letter-spacing: var(--ds-tracking-hero);
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, var(--ds-color-primary), var(--ds-color-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.about-figure__unit {
  color: var(--ds-color-text-primary);
  font-size: var(--ds-text-headline-sm-size);
  line-height: var(--ds-text-headline-sm-line);
  font-weight: var(--ds-weight-semibold);
}

.about-record__closing {
  max-width: 34em;
  margin-top: clamp(var(--ds-space-xl), 4vw, var(--ds-space-2xl));
}

@media (width <= 768px) {
  .about-figures { grid-template-columns: 1fr; }
  .about-figure,
  .about-figure:first-child { padding: var(--ds-space-lg) 0; }
  .about-figure + .about-figure { border-left: 0; border-top: var(--ds-border-width) solid var(--ds-color-border); }
}

@media (prefers-reduced-motion: reduce) {
  .about-banner__scroll-line::after { animation: none; }
}
