/* why-taiwan — 由 prototype-20260904/en/why-taiwan.html 的 <style> 抽出 */
:root {
  --navy:          #1A2B45;
  --navy-light:    #2A3D5C; /* Navy Light: accents, hovers, secondary emphasis */
  --cloud:         #F1F5F9; /* Cloud: section backgrounds, fills */
  --text-heading:  #1A2B45;
  --text-body:     #334155;
  --text-muted:    #64748B; /* Slate */
  --border:        rgba(100,116,139,0.25); /* Slate tint */
  --surface:       #F1F5F9;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-body); background: #fff;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1440px; margin: 0 auto; padding: 0 2rem; }

.annotation {
  background: var(--cloud); border-left: 4px solid var(--navy-light);
  padding: 0.75rem 1rem; margin: 0.75rem 0;
  font-size: 0.8rem; color: var(--text-body); line-height: 1.5;
  border-radius: 0 0.375rem 0.375rem 0;
}
.annotation strong { color: var(--navy); }
/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.site-header .inner {
  max-width: 1440px; margin: 0 auto; padding: 0 2rem;
  height: 5.75rem; display: flex; align-items: center; justify-content: space-between;
}
.site-logo { display: flex; align-items: center; }
.site-logo svg { height: 4.25rem; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a { font-size: 0.875rem; color: var(--text-heading); font-weight: 500; transition: color 0.2s; }
.site-nav a:hover, .site-nav a.active { color: var(--navy-light); }
.lang-toggle {
  font-size: 0.8rem; font-weight: 500; border-radius: 9999px;
  padding: 0.375rem 0.75rem; letter-spacing: 0.05em;
  border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: 0.5rem; font-weight: 600; font-size: 0.875rem;
  padding: 0.75rem 1.5rem; cursor: pointer; border: none;
  transition: transform 0.2s, filter 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-white { background-color: #fff; color: var(--navy); }
.btn-white:hover { background-color: var(--cloud); }

/* ── Page Hero ── */
.page-hero {
  background: var(--navy); padding: 7rem 0 4rem; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(241,245,249,0.06) 1px, transparent 1px);
  background-size: 72px 72px;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 3px; color: var(--cloud); font-weight: 600; margin-bottom: 1rem; }
.page-hero h1 { font-size: clamp(32px, 4vw, 56px); font-weight: 700; color: #fff; line-height: 1.1; margin-bottom: 1rem; }
.page-hero p { font-size: 1.125rem; color: rgba(241,245,249,0.7); max-width: 40rem; line-height: 1.7; }

/* ── Sections ── */
.section { padding: 4rem 0; }
.section-alt { background: var(--surface); }
.section-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 3px; color: var(--navy-light); font-weight: 600; margin-bottom: 0.75rem; }
.section-title { font-size: 1.75rem; font-weight: 700; color: var(--text-heading); margin-bottom: 0.5rem; }
.section-subtitle { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 2.5rem; line-height: 1.7; max-width: 40rem; }

/* ── Stats Banner ── */
.stats-banner {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
  padding: 3rem 0;
}
@media (max-width: 768px) { .stats-banner { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .stats-banner { grid-template-columns: 1fr; } }
.stat-item { text-align: center; }
.stat-item .stat-value {
  font-size: 2.5rem; font-weight: 700; color: var(--navy-light);
  line-height: 1.1; margin-bottom: 0.375rem;
}
.stat-item .stat-label {
  font-size: 0.8125rem; color: var(--text-muted); line-height: 1.5;
}
.stat-item .stat-source {
  font-size: 0.6875rem; color: var(--text-muted); opacity: 0.6; margin-top: 0.25rem;
}

/* ── Advantages Grid ── */
.advantages-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
@media (max-width: 900px) { .advantages-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .advantages-grid { grid-template-columns: 1fr; } }
.advantage-card {
  background: #fff; border: 1px solid var(--border); border-radius: 0.75rem;
  padding: 2rem; transition: transform 0.2s, box-shadow 0.2s;
}
.advantage-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.advantage-card .adv-icon {
  width: 3rem; height: 3rem; margin-bottom: 1rem;
  background: var(--navy); border-radius: 0.5rem;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.6rem;
}
.advantage-card h3 { font-size: 1rem; font-weight: 600; color: var(--text-heading); margin-bottom: 0.5rem; }
.advantage-card p { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.6; }

/* ── Industry Sectors ── */
.sectors-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
}
@media (max-width: 600px) { .sectors-grid { grid-template-columns: 1fr; } }
.sector-card {
  border-left: 3px solid var(--navy-light); padding: 1.5rem;
  background: #fff; border-radius: 0 0.5rem 0.5rem 0;
}
.sector-card h4 { font-size: 0.9375rem; font-weight: 600; color: var(--text-heading); margin-bottom: 0.375rem; }
.sector-card p { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.6; }

/* ── Timeline ── */
.timeline { max-width: 700px; margin: 2rem auto 0; }
.timeline-item {
  display: grid; grid-template-columns: 100px 3rem 1fr; align-items: start;
  margin-bottom: 1.5rem;
}
.timeline-year {
  font-size: 1rem; font-weight: 700; color: var(--navy-light); text-align: right; padding-top: 0.15rem;
}
.timeline-dot-col { display: flex; flex-direction: column; align-items: center; }
.timeline-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--navy); border: 2px solid var(--navy-light);
  margin-top: 0.35rem;
}
.timeline-line { width: 2px; flex: 1; background: var(--border); margin-top: 0.25rem; }
.timeline-content h4 { font-size: 0.875rem; font-weight: 600; color: var(--text-heading); margin-bottom: 0.25rem; }
.timeline-content p { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.6; }

/* ── CTA Block ── */
.cta-block {
  position: relative; background: var(--navy);
  padding: 5rem 0; text-align: center; overflow: hidden;
}
.cta-block::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(241,245,249,0.08) 0%, transparent 70%);
}
.cta-block .container { position: relative; z-index: 1; }
.cta-block h2 { font-size: 1.75rem; font-weight: 700; color: #fff; margin-bottom: 0.75rem; }
.cta-block p { font-size: 1rem; color: rgba(241,245,249,0.7); margin-bottom: 2rem; }

/* ── Footer ── */
.site-footer {
  background: var(--navy); color: rgba(241,245,249,0.5);
  padding: 3rem 0 1.5rem; border-top: 1px solid rgba(241,245,249,0.1);
}
.footer-inner { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 2rem; }
.footer-brand { max-width: 280px; }
.footer-brand h4 { color: #fff; font-size: 1rem; margin-bottom: 0.5rem; }
.footer-brand p { font-size: 0.75rem; line-height: 1.6; }
.footer-nav { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-nav-col h5 { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 2px; color: rgba(241,245,249,0.3); margin-bottom: 0.75rem; font-weight: 600; }
.footer-nav-col a { display: block; font-size: 0.8125rem; color: rgba(241,245,249,0.6); margin-bottom: 0.5rem; }
.footer-nav-col a:hover { color: #fff; }
.footer-bottom { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(241,245,249,0.08); font-size: 0.6875rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }

/* ── Major Roadmap (items 8, 10, 11, 15) ── */

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid var(--navy-light);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Focus ring on dark navy sections needs a light color to stay visible */
.page-hero a:focus-visible,
.cta-block a:focus-visible,
.supplier-cta a:focus-visible,
.site-footer a:focus-visible {
  outline-color: var(--cloud);
}


.nav-toggle {
  display: none;
  width: 2.5rem; height: 2.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle-bars { position: relative; display: block; width: 18px; height: 2px; background: var(--text-heading); }
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: ''; position: absolute; left: 0;
  width: 18px; height: 2px; background: var(--text-heading);
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after  { top: 6px; }

@media (max-width: 900px) {
  .site-header .inner { position: relative; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 2rem 1rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    padding: 0.875rem 0;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--border);
  }
  .site-nav a:last-child { border-bottom: 0; }
}

/* ── 客戶要求：置入原網站圖片素材（2026-09-07）── */
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  /* 沿用線上站 .inner-hero-overlay 的漸層比例，確保左側文字對比 */
  background-image: linear-gradient(to right, rgba(5,13,26,0.95), rgba(10,22,40,0.80), rgba(10,22,40,0.30)), var(--hero-photo);
  background-size: cover, cover; background-position: center, center;
}
.photo-band {
  height: clamp(230px, 30vw, 430px);
  background-size: cover; background-position: center;
  background-repeat: no-repeat;
}


/* ── 客戶要求：含台北 101 的圖片不得裁切（2026-09-08）──
   101 為縱向主體、佔畫面 57%~94% 高度，短版面用 cover 必切。
   改為依高度縮放（auto 100%）＋不重複，寬版面即可完整呈現。 */
.cta-block::before, .supplier-cta::before {
  background-color: #0A1628 !important;
  background-image: linear-gradient(90deg, rgba(10,22,40,.30) 0%, rgba(10,22,40,.55) 32%, rgba(10,22,40,.80) 58%, rgba(10,22,40,.88) 100%),
                    url('../../photos/taipei-night-wide.jpg') !important;
  background-size: 100% 100%, cover !important;
  background-position: center, 6% center !important;
  background-repeat: no-repeat, no-repeat !important;
}
.page-hero.hero-whole::before {
  background-color: #0A1628;
  /* 兩層遮罩：橫向護標題、縱向護下方數據卡（卡片會落在照片亮處） */
  background-image: linear-gradient(180deg, rgba(10,22,40,.10) 0%, rgba(10,22,40,.22) 46%, rgba(10,22,40,.74) 78%, rgba(10,22,40,.86) 100%),
                    linear-gradient(90deg, rgba(5,13,26,.92) 0%, rgba(10,22,40,.66) 40%, rgba(10,22,40,.20) 68%, rgba(10,22,40,.42) 100%),
                    var(--hero-photo);
  background-size: 100% 100%, 100% 100%, cover;
  background-position: center, center, 42% center;
  background-repeat: no-repeat, no-repeat, no-repeat;
}

/* ── 客戶要求：重新校正裁切對焦點，避免人像被截（2026-09-08）── */
.page-hero[style*='iStock-2211208040']::before { background-position: center, center 40%; }
.photo-band[style*='iStock-2211208040'] { background-position: center 40%; }
.page-hero[style*='iStock-1363604950']::before { background-position: center, center 30%; }
.photo-band[style*='iStock-1363604950'] { background-position: center 30%; }
.page-hero[style*='iStock-2243912827']::before { background-position: center, center 35%; }
.photo-band[style*='iStock-2243912827'] { background-position: center 35%; }
.page-hero[style*='hero-suppliers']::before { background-position: center, center 22%; }
.photo-band[style*='hero-suppliers'] { background-position: center 8%; }
.page-hero[style*='semiconductor-wafer']::before { background-position: center, center 45%; }
.photo-band[style*='semiconductor-wafer'] { background-position: center 45%; }
.page-hero[style*='pcb-circuit-macro']::before { background-position: center, center; }
.photo-band[style*='pcb-circuit-macro'] { background-position: center; }
.page-hero[style*='pcb-navy-gold']::before { background-position: center, center; }
.photo-band[style*='pcb-navy-gold'] { background-position: center; }

/* ── 客戶要求：統計改回原站卡片式（沿用現有配色）＋ hover 成長圖（2026-09-08）── */
.stats-banner { gap: 1.25rem; }
.stat-card {
  position: relative; overflow: hidden; text-align: left;
  background: var(--surface);
  border-left: 4px solid var(--navy-light);
  border-radius: 0.5rem;
  padding: 1.75rem 1.5rem;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.stat-card:hover { background: #fff; box-shadow: 0 10px 28px rgba(26,43,69,0.10); transform: translateY(-2px); }
.stat-card > *:not(.stat-chart) { position: relative; z-index: 1; }
.stat-card .stat-value { font-size: clamp(1.45rem, 2.3vw, 2.4rem); font-weight: 700; color: var(--navy-light);
  line-height: 1.1; margin-bottom: 0.375rem; white-space: nowrap; letter-spacing: -0.01em; }
.stat-card .stat-label { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.5; }
.stat-card .stat-source { font-size: 0.6875rem; color: var(--text-muted); opacity: 0.6; margin-top: 0.25rem; }

.stat-chart {
  position: absolute; inset: auto 0 0 0; width: 100%; height: 54%;
  color: var(--navy-light); opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.stat-chart .gb { fill: currentColor; opacity: 0.13; transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform 0.5s cubic-bezier(.2,.7,.3,1); transition-delay: var(--d); }
.stat-chart .gl { opacity: 0.26; stroke-dasharray: 120; stroke-dashoffset: 120;
  transition: stroke-dashoffset 0.7s ease 0.15s; }
.stat-card:hover .stat-chart { opacity: 1; }
.stat-card:hover .stat-chart .gb { transform: scaleY(1); }
.stat-card:hover .stat-chart .gl { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
  .stat-chart .gb, .stat-chart .gl { transition: none; }
}

/* ── 手機版：文字滿寬，水平漸層擋不住 → 改用垂直遮罩（2026-09-12）── */
@media (max-width: 900px) {
  .page-hero::before {
    background-image: linear-gradient(180deg, rgba(5,13,26,.70) 0%, rgba(10,22,40,.80) 45%, rgba(10,22,40,.92) 100%),
                      var(--hero-photo);
    background-size: 100% 100%, cover;
    background-position: center, center;
  }
  .page-hero.hero-whole::before {
    background-image: linear-gradient(180deg, rgba(5,13,26,.62) 0%, rgba(10,22,40,.76) 42%, rgba(10,22,40,.90) 100%),
                      var(--hero-photo);
    background-size: 100% 100%, cover;
    background-position: center, 42% center;
    background-repeat: no-repeat, no-repeat;
  }
  .cta-block::before, .supplier-cta::before {
    background-image: linear-gradient(180deg, rgba(10,22,40,.62) 0%, rgba(10,22,40,.86) 100%),
                      url('../../photos/taipei-night-wide.jpg') !important;
    background-size: 100% 100%, cover !important;
    background-position: center, 6% center !important;
  }
}

/* ── 客戶要求：主視覺延伸包住數據卡，合併為同一區塊（2026-09-12）
   比照線上網站做法：同一張背景、中間一條分隔線 ── */
.page-hero { padding-bottom: 0; }
.hero-stats { position: relative; z-index: 1; margin-top: 3.25rem;
  border-top: 1px solid rgba(241,245,249,0.16); padding: 2.75rem 0 3.5rem; }
.hero-stats .stats-banner { padding: 0; gap: 1.25rem; }

/* 卡片改為深底版本（沿用線上網站的金色左邊框） */
.page-hero .stat-card { background: rgba(12,24,44,0.42); border-left: 4px solid #d4b866;
  padding: 1.5rem 1.35rem; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.page-hero .stat-card:hover { background: rgba(12,24,44,0.58);
  box-shadow: 0 12px 30px rgba(5,13,26,0.35); }
.page-hero .stat-card .stat-value { color: #d4b866; }
.page-hero .stat-card .stat-label { color: rgba(241,245,249,0.82); }
.page-hero .stat-card .stat-source { color: rgba(241,245,249,0.5); opacity: 1; }
.page-hero .stat-chart { color: #d4b866; }
.page-hero .stat-chart .gb { opacity: 0.22; }
.page-hero .stat-chart .gl { opacity: 0.5; }

@media (max-width: 900px) {
  .hero-stats { margin-top: 2.25rem; padding: 2rem 0 2.5rem; }
}

/* ── 客戶要求：nav bar logo 放大（2026-09-12）── */
@media (max-width: 700px) {
  .site-header .inner { height: 4.9rem; }
  .site-logo svg { height: 3.4rem; }
}

/* ── 手機版排版優化與錯誤修正（2026-09-13）── */
/* 格線／flex 子項預設 min-width:auto，會被 canvas、長 email 等內容撐破版面 */
.office-grid > *, .globe-wrap, .globe-stage, .verify-merged > *, .stats-banner > *,
.form-tabs > *, .contact-forms, .form-row > * { min-width: 0; }
.globe-canvas { max-width: 100%; }

@media (max-width: 900px) {
  /* header 是獨立 sticky 列，內頁主視覺不需要 7rem 上留白 */
  .page-hero { padding-top: 4.5rem; }
  .page-hero:not(.hero-whole) { padding-bottom: 3rem; }

  /* Why Taiwan：數據卡改 2×2，主視覺高度大幅縮短；觸控沒有 hover，隱藏成長圖 */
  .hero-stats .stats-banner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .page-hero .stat-card { padding: 1rem 0.9rem; }
  .page-hero .stat-card .stat-value { font-size: 1.3rem; }
  .page-hero .stat-card .stat-label { font-size: 0.8125rem; }
  .page-hero .stat-card .stat-chart { display: none; }

  /* 公司資料：窄螢幕改上下排，長 email 可斷行 */
  .vm-facts dl.company-details, .vm-facts dl { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .company-details dt, .vm-facts dt { white-space: normal; margin-top: 0.6rem; }
  .vm-facts dd, .office-card dd { overflow-wrap: anywhere; }

  /* 聯絡表單分頁：三等分、允許換行 */
  .form-tab { flex: 1 1 0; padding: 0.8rem 0.35rem; font-size: 0.8125rem; line-height: 1.35;
    text-align: center; white-space: normal; min-height: 3rem; }

  /* iOS Safari：輸入框小於 16px 會在點擊時自動放大畫面 */
  .form-group input, .form-group select, .form-group textarea, input[type="file"] { font-size: 16px; }

  /* 觸控目標至少 44px */
  .lang-toggle { min-height: 2.75rem; padding: 0.55rem 0.9rem; }
  .service-card details.includes summary, .product-card details.includes summary,
  .detail-card details.includes summary, .value-details summary { min-height: 2.75rem; }
  .verify-card .btn { min-height: 2.75rem; display: inline-flex; align-items: center; }
  .glyph-replay { min-height: 2.25rem; padding: 0.35rem 0.75rem 0.35rem 0.6rem; font-size: 0.75rem; }
  .office-card { padding: 1.5rem; }

  /* 小字下限 12px */
  .cat-card-body .tier, .product-card-body .tier, .detail-card-body .tier,
  .office-card .eyebrow, .office-card dt, .globe-hint, .footer-nav-col h5,
  .cert-badge .cert-desc, .page-hero .stat-card .stat-source, .service-card .service-number,
  .service-card details.includes summary, .product-card details.includes summary,
  .glyph-gloss { font-size: 0.75rem; }
}

/* ── 手機修正 第二批（2026-09-13）── */
/* 上傳框的「視覺隱藏」被 .form-group input { width:100% } 用較高權重蓋掉，外層又沒有定位基準 → 偏移撐破版面 */
.file-upload { position: relative; }
.form-group .file-upload-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 900px) {
  .footer-bottom { font-size: 0.75rem; }
  .checkbox-group { align-items: flex-start; gap: 0.7rem; }
  .checkbox-group input[type="checkbox"] { width: 1.25rem; height: 1.25rem; flex: none; margin-top: 0.1rem; }
  .checkbox-group label { font-size: 0.8125rem; padding: 0.15rem 0; }
  .form-group input[type="file"]:not(.file-upload-input) { min-height: 2.75rem; }
}
@media (max-width: 500px) {
  /* 首頁主視覺：9rem 上留白與 36px 標題在手機上把首屏撐到 600~720px */
  .hero-content { padding: 5.25rem 1.25rem 3.25rem; }
  .hero h1 { font-size: clamp(30px, 8.6vw, 36px); margin-bottom: 1.1rem; }
}
