/* 首頁區塊，由 Demo 的 flagship.css 移植。差異見 docs/home-demo-diff.md。 */
.flag-hero { background: var(--navy); color: white; }
/* 原圖約 3.76:1，依原比例完整顯示，不疊字、不裁切 */
.hero-photo { position: relative; aspect-ratio: 1920 / 510; overflow: hidden; background: #0d1d31; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-panel { border-bottom: 1px solid #ffffff14; }
.hero-panel-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 50px; align-items: end; padding-block: 38px 30px; }
.eyebrow, .kicker { display: block; font: 500 .875rem/1.6 ui-monospace, monospace; letter-spacing: .18em; margin-bottom: 18px; }
.hero-copy h1 { font-size: clamp(2.4rem, 4vw, 4.2rem); margin: 0 0 14px; }
.hero-intro { font-size: 1.1rem; letter-spacing: .08em; margin-bottom: 0; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 30px; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 26px; min-height: 44px; background: linear-gradient(180deg, #76d1ce, #48adad); color: #082238; padding: 14px 25px; font-weight: 700; box-shadow: 0 10px 25px #0002; transition: transform .25s; }
a.btn:hover { transform: translateY(-3px); }
.film-link { display: inline-flex; align-items: center; min-height: 44px; }
.hero-nav { min-width: 0; }
.scene-tabs { position: relative; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 4px 10px; scrollbar-width: thin; }
.scene-tabs button { flex: 0 0 132px; scroll-snap-align: start; background: transparent; border: 2px solid transparent; color: white; padding: 0; text-align: left; opacity: .6; transition: opacity .2s; }
.scene-tabs img { width: 100%; height: 40px; object-fit: cover; }
.scene-number { display: grid; place-items: center; height: 40px; background: #ffffff14; font: 500 .9rem ui-monospace, monospace; letter-spacing: .08em; }
.scene-tabs span { display: block; font-size: .85rem; padding: 4px 2px 0; }
.scene-tabs button[aria-pressed=true] { opacity: 1; border-color: var(--aqua); }
.hero-bottom { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; justify-content: flex-end; font-size: .875rem; letter-spacing: .1em; }
.scene-count { font-family: ui-monospace, monospace; }
.scene-label:empty { display: none; }
.scene-controls { display: flex; }
.scene-controls button { background: transparent; border: 0; color: white; min-width: 44px; min-height: 44px; padding: 10px 15px; }
.products-section, .mission-section, .news-section { padding: 80px 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 60px; margin-bottom: 38px; }
.section-head h2 { margin: 0; }
.section-head > div:last-child { max-width: 510px; }
.section-side { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.section-side p { margin: 0; color: var(--muted); }
.text-link { display: inline-block; margin-top: 10px; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.card-link::after { content: ''; position: absolute; inset: 0; }
/* AI 區：淺色背景，圖片在右側，文字對比依淺底調整 */
.ai-section { background: linear-gradient(180deg, #ffffff, #eef3f7); color: var(--ink); }
.ai-layout { padding-block: 75px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.ai-layout > * { min-width: 0; }
.ai-layout h2 { margin-bottom: 24px; }
.ai-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 25px 0; }
.ai-tabs button { background: transparent; color: var(--muted); border: 0; border-bottom: 2px solid var(--line); min-height: 44px; padding: 10px 26px; font-size: 1.1rem; }
.ai-tabs button[aria-pressed=true] { color: #0b6464; border-color: #0b6464; font-weight: 700; }
.ai-panels { max-width: 520px; min-height: 3.5em; color: var(--muted); }
.ai-panel p { margin-bottom: 12px; }
.js .ai-panel strong { display: none; }
.ai-media { margin: 0; }
.ai-image { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: #dbe5ec; box-shadow: 0 18px 40px #13263d1f; }
.ai-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ai-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 12px; font-size: .9rem; color: var(--muted); }
/* 八大產品類別：局部橫向捲動，不自動輪播 */
.products-section { background: #f8fafb; }
.category-controls { display: flex; gap: 8px; }
.category-controls button { min-width: 44px; min-height: 44px; border: 1px solid var(--line); background: white; color: var(--ink); }
.category-controls button:disabled { opacity: .35; cursor: default; }
.category-track { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 4px; padding: 4px 4px 14px; scrollbar-width: thin; }
.category-track ul { display: flex; gap: 18px; margin: 0; padding: 0; list-style: none; }
.category-card { position: relative; flex: 0 0 calc((100% - 4 * 18px) / 4.4); min-width: 0; scroll-snap-align: start; background: white; box-shadow: 0 9px 20px #13263d0d; }
.category-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #dbe5ec; }
.category-number { display: block; padding: 14px 18px 0; font: .8rem ui-monospace, monospace; color: var(--muted); }
.category-card h3 { margin: 0; padding: 4px 18px 18px; font-size: 1.15rem; }
.category-card:hover h3, .category-card:focus-within h3 { color: #0b6464; }
.mission-section { background: linear-gradient(180deg, #f4f7f9, #e4ecf1); }
.mission-section .section-head { margin-bottom: 30px; }
.mission-section h2 { font-size: 2.2rem; }
.mission-section .section-head > p { max-width: 460px; color: var(--muted); margin: 0; }
/* 站內入口白底卡片：桌機四欄、平板兩欄、手機單欄 */
.mission-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.mission-card { position: relative; min-width: 0; padding: 26px; background: white; box-shadow: 0 9px 20px #13263d0d; transition: transform .3s; }
.mission-card:hover { transform: translateY(-4px); }
.mission-card h3 { margin: 14px 0 6px; font-size: 1.2rem; }
.mission-card p { font-size: .875rem; color: var(--muted); margin: 0; }
.icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.icon-about { color: #007f9c; }
.icon-products { color: #6544c9; }
.icon-news { color: #b9551a; }
.icon-media { color: #be3a77; }
.icon-careers { color: #067a61; }
.icon-procurement { color: #8f6600; }
.icon-location, .icon-external { color: #0b6464; }
/* 外連橫幅：整條一個連結；手機一列一條，平板以上一列兩條，奇數最後一條不拉滿 */
.banner-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.mission-banner { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 18px; min-height: 96px; padding: 20px 26px; background: linear-gradient(100deg, #13263d, #1f4a63); color: white; transition: transform .3s; }
.mission-banner:hover { transform: translateY(-3px); }
.mission-banner .icon { flex-shrink: 0; display: grid; place-items: center; width: 56px; height: 56px; background: #ffffff14; color: var(--aqua); }
.banner-photo { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: .25; }
.banner-text { display: flex; flex-direction: column; min-width: 0; }
.banner-text strong { font-size: 1.2rem; }
.banner-text span { font-size: .875rem; color: #c9d7e1; }
.banner-mark { margin-left: auto; font-size: 1.4rem; color: var(--aqua); }
.news-section { background: #f8fafb; }
.news-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 65px; }
.news-layout > * { min-width: 0; }
.news-title h2 { font-size: 2.8rem; }
.news-list > article { position: relative; display: flex; align-items: center; gap: 25px; padding: 23px 0; border-top: 1px solid var(--line); }
.news-list > article > div { min-width: 0; }
.news-list h3 { font-size: 1.1rem; margin: 5px 0; }
.news-list time { min-width: 75px; display: flex; flex-direction: column; flex-shrink: 0; }
.news-list time b { font-size: 1.8rem; font-weight: 400; }
.news-list time span, .tag { font-size: .875rem; color: var(--muted); }
.news-list i { margin-left: auto; }
.news-empty { padding: 23px 0; border-top: 1px solid var(--line); color: var(--muted); }
.film-section { background: #11273b; color: white; padding: 70px 0; }
.film-layout { display: grid; grid-template-columns: 1fr 1.5fr; align-items: center; gap: 60px; }
.film-layout > * { min-width: 0; }
.film-image { position: relative; display: block; overflow: hidden; }
.film-image img { width: 100%; height: 280px; object-fit: cover; transition: transform .6s; }
a.film-image:hover img { transform: scale(1.05); }
.film-image span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 3rem; padding: 0 24px; background: #09152790; border-radius: 50%; }
html:not(.js) .scene-controls { display: none; }
html:not(.js) .scene-tabs button { opacity: 1; cursor: default; }
html:not(.js) .hero-bottom { display: none; }
@media (max-width: 1200px) {
  .category-card { flex-basis: calc((100% - 3 * 18px) / 3.4); }
}

@media (max-width: 1023px) {
  .hero-panel-inner { grid-template-columns: 1fr; gap: 26px; }
  .hero-bottom { justify-content: space-between; }
  .section-head { gap: 30px; }
  .ai-layout { gap: 36px; }
  .category-card { flex-basis: calc((100% - 18px) / 2.2); }
  .mission-grid { grid-template-columns: repeat(2, 1fr); }
  .news-layout { gap: 30px; }
}

@media (max-width: 767px) {
  .hero-panel-inner { padding-block: 26px 18px; }
  .hero-copy h1 { font-size: 2.4rem; }
  .eyebrow { font-size: .75rem; letter-spacing: .1em; margin-bottom: 12px; }
  .hero-intro { font-size: 1rem; }
  .btn { padding: 13px 19px; }
  .scene-tabs button { flex-basis: 104px; }
  .products-section, .mission-section, .news-section { padding: 50px 0; }
  .section-head { display: block; }
  .section-head h2 { margin-bottom: 22px; }
  .section-side { align-items: flex-start; }
  .ai-layout { grid-template-columns: 1fr; padding-block: 50px; gap: 24px; }
  .ai-tabs button { padding: 10px 20px; }
  .category-card { flex-basis: 82%; }
  .mission-grid { grid-template-columns: 1fr; gap: 14px; }
  .banner-grid { grid-template-columns: 1fr; gap: 14px; }
  .mission-banner { padding: 18px 20px; }
  .news-layout, .film-layout { grid-template-columns: 1fr; gap: 30px; }
  .news-title h2 { margin-bottom: 18px; }
  .news-list > article { gap: 15px; }
  .film-section { padding: 50px 0; }
  .film-image img { height: 220px; }
}
