/*
Theme Name: Dingda 2026
Theme URI: https://dingta.com.tw
Author: C2ME
Author URI: https://c2me.com.tw
Description: 鼎大金屬工程 2026 改版主題。現代建築感 × 精密金屬工藝，替代舊版 2016 Bootstrap3 主題（dingda，保留不動供回滾）。
Version: 0.1.0
Requires at least: 6.0
Requires PHP: 8.0
License: Proprietary
Text Domain: dingda-2026
*/

/* ==========================================================================
   1. Design Tokens — 逐字取自 design-tokens.md，不得自行更改色值
   ========================================================================== */
:root{
  --ink:        #1C1E20; /* 石墨黑 — 主文字/深底 */
  --paper:      #F4F2ED; /* 暖白 — 主背景 */
  --metal:      #6D7378; /* 金屬灰 — 次要文字/邊線 */
  --steel:      #323A40; /* 深灰藍 — 深區塊底 */
  --copper:     #9A744D; /* 氧化銅棕 — 重點色，小範圍用 */
  --white:      #FFFFFF;

  /* 字體 */
  --font-zh: "Noto Sans TC", sans-serif;
  --font-en: "Inter", "Manrope", sans-serif;

  /* 版型 */
  --container-max: 1440px;
  --radius: 4px;

  /* 斷點參考值（供註解對照，實際媒體查詢見下方） */
  --bp-tablet: 768px;
  --bp-desktop: 1024px;

  /* 常用透明線 */
  --line-metal-15: rgba(109, 115, 120, .15);
  --line-metal-30: rgba(109, 115, 120, .3);
  --overlay-hero: rgba(28, 30, 32, .35);

  /* ── 衍生 token（整合期補齊，逐字取自 DESIGN.md，供各模板 CSS 共用）── */
  /* 語意衍生色（同色不同透明度，非新色） */
  --copper-hover:      rgba(154,116,77,.85);
  --ink-on-dark:       #F4F2ED;
  --metal-on-dark:     #A9AEB2;
  --hairline:          rgba(109,115,120,.28);
  --hairline-strong:   rgba(109,115,120,.5);
  --hairline-on-dark:  rgba(244,242,237,.16);
  --scrim:             rgba(28,30,32,.35);
  --scrim-gradient:    linear-gradient(180deg,rgba(28,30,32,.15) 0%,rgba(28,30,32,.55) 100%);
  --shadow-case:       0 12px 32px rgba(28,30,32,.14);

  /* 狀態色（僅表單/系統回饋） */
  --success: #3F6E52;
  --warning: #9A744D;
  --error:   #A5453B;

  /* 圓角完整階 */
  --radius-sm: 2px;
  --radius-lg: 6px;

  /* 間距（8pt grid，每行一個 token 便於工具比對） */
  --sp-xxs: 4px;
  --sp-xs: 8px;
  --sp-sm: 12px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-xxl: 48px;
  --sp-section: 96px;
  --sp-section-sm: 56px;

  /* 版型 gutter + container 別名（各模板 CSS 用 --container，對齊 --container-max） */
  --container: 1440px;
  --gutter: 32px;

  /* 動效 */
  --ease-out: cubic-bezier(.16,.84,.44,1);
  --dur-fast: 180ms;
  --dur:      280ms;
  --dur-slow: 400ms;

  /* header-footer.css 用的動效別名（對齊上方） */
  --hf-dur:      280ms;
  --hf-dur-fast: 180ms;
  --hf-ease-out: cubic-bezier(.16,.84,.44,1);
}

/* ==========================================================================
   2. CSS Reset（精簡版）
   ========================================================================== */
*,
*::before,
*::after{
  box-sizing: border-box;
}

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

body{
  margin: 0;
  padding: 0;
  min-width: 320px;
  overflow-x: hidden; /* body 不得橫向捲動；寬內容各自 overflow-x:auto */
}

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

img, picture, video, canvas, svg{
  display: block;
  max-width: 100%;
  height: auto;
}

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

button, input, textarea, select{
  font: inherit;
  color: inherit;
}

table{
  border-collapse: collapse;
  width: 100%;
}

/* 寬內容（表格/大圖）自身 overflow-x:auto，不拖垮 body */
.table-scroll,
.overflow-x-auto{
  overflow-x: auto;
}

/* ==========================================================================
   3. Base Typography
   ========================================================================== */
body{
  font-family: var(--font-zh);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6{
  font-family: var(--font-zh);
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 .6em;
  color: var(--ink);
}

/* 數字/英文優先套用 Inter，混排時用 lang 或 .num 標記 */
.num,
[lang="en"]{
  font-family: var(--font-en);
}

h1{ font-size: clamp(2rem, 4vw, 3.5rem); }
h2{ font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3{ font-size: clamp(1.25rem, 2vw, 1.75rem); }

p{
  margin: 0 0 1em;
}

/* ==========================================================================
   4. Container / Layout
   ========================================================================== */
.container{
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section{
  padding-top: 80px;
  padding-bottom: 80px;
}

/* 全版設計，不做左右切割式版面；區塊內部再用 container 收邊 */
.section-full{
  width: 100%;
}

/* ==========================================================================
   5. UI 規則
   ========================================================================== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: 14px 32px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform .25s ease, background-color .25s ease, color .25s ease;
}

.btn-primary{
  background-color: var(--copper);
  color: var(--white);
}

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

.btn-outline{
  background-color: transparent;
  border-color: var(--metal);
  color: var(--ink);
}

.hairline{
  border: none;
  border-top: 1px solid var(--line-metal-15);
}

/* Hero 遮罩：深色 35%，供 front-page hero 區塊使用 */
.hero-overlay{
  background-color: var(--overlay-hero);
}

/* 動畫：只做淡入 / 圖片微放大 / 文字位移，禁止旋轉、彈跳、複雜視差 */
.fade-in{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}

.fade-in.is-visible{
  opacity: 1;
  transform: translateY(0);
}

.img-zoom{
  overflow: hidden;
}

.img-zoom img{
  transition: transform .5s ease;
}

.img-zoom:hover img{
  transform: scale(1.04);
}

/* ==========================================================================
   6. 手機底部固定聯絡按鈕列
   ========================================================================== */
.mobile-contact-bar{
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background-color: var(--white);
  border-top: 1px solid var(--line-metal-15);
}

/* ==========================================================================
   7. 響應式斷點
   ========================================================================== */
/* 手機 <768px：預設樣式即手機版 */
.mobile-contact-bar{
  display: flex;
}

/* 平板 768–1023px */
@media (min-width: 768px){
  .section{
    padding-top: 96px;
    padding-bottom: 96px;
  }
}

/* 桌機 ≥1024px */
@media (min-width: 1024px){
  .mobile-contact-bar{
    display: none;
  }

  .section{
    padding-top: 120px;
    padding-bottom: 120px;
  }
}
