/* =========================================================================
   ASUKA — Components
   每個 section 型別對應一組 class，改版型只要改這裡或 render.js 的模板
   ========================================================================= */

/* ================= 按鈕 ================= */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 26px;
  font-size: .92rem; font-weight: var(--fw-semi);
  letter-spacing: .01em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all .22s var(--ease);
  white-space: nowrap;
}
.btn__arrow { transition: transform .22s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-strong); }

.btn--ghost { border-color: rgba(255,255,255,.4); color: var(--text-on-dark); }
.btn--ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }

.btn--outline { border-color: var(--line-light); color: var(--text-on-light); }
.btn--outline:hover { border-color: var(--brand); color: var(--brand); }

.btn--sm { padding: 9px 18px; font-size: .85rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .88rem; font-weight: var(--fw-semi);
  color: var(--brand);
}
.link-arrow svg { transition: transform .22s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: clamp(560px, 88vh, 900px);
  display: flex; align-items: flex-end;
  background: var(--ink-900);
  color: var(--text-on-dark);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(5,9,15,.94) 0%, rgba(5,9,15,.62) 42%, rgba(5,9,15,.30) 100%),
    linear-gradient(to right, rgba(5,9,15,.80) 0%, rgba(5,9,15,0) 62%);
}
.hero__inner {
  position: relative;
  width: 100%; max-width: var(--container);
  margin-inline: auto;
  padding: calc(var(--header-h) + var(--sp-8)) var(--gutter) var(--sp-8);
}
.hero__body { max-width: 940px; }
.hero__body > * + * { margin-top: var(--sp-5); }
.hero__title { max-width: 16ch; }
.hero__title em { font-style: normal; color: var(--brand); }
.hero__lead { max-width: 62ch; color: var(--text-on-dark-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

.hero__scroll {
  position: absolute; right: var(--gutter); bottom: var(--sp-8);
  display: flex; align-items: center; gap: 10px;
  font-size: var(--fs-xs); letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--text-on-dark-3);
}
.hero__scroll i {
  display: block; width: 1px; height: 44px;
  background: linear-gradient(to bottom, var(--brand), transparent);
}
@media (max-width: 720px) { .hero__scroll { display: none; } }

/* ================= 數據條 STATS ================= */
.stats {
  background: var(--ink-800);
  color: var(--text-on-dark);
  border-block: 1px solid var(--line-dark);
}
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding-block: var(--sp-7);
}
.stats__item { padding-inline: var(--sp-5); border-left: 1px solid var(--line-dark); }
.stats__item:first-child { border-left: 0; padding-left: 0; }
.stats__num {
  font-size: clamp(2rem, 1.2rem + 2.2vw, 3rem);
  font-weight: var(--fw-black); line-height: 1;
  letter-spacing: var(--tracking-tight);
  color: var(--brand);
}
/* 合作夥伴 logo（v1.15）：與數字同高的一列，底部對齊數字的基線位置 */
.stats__logos {
  display: flex; align-items: center; flex-wrap: nowrap;   /* 兩個 logo 永遠同一列 */
  gap: clamp(12px, 2vw, 28px);
  min-height: 1em;               /* 與數字列同高，下方說明文字才會對齊 */
}
.stats__logos img {
  height: calc(var(--logo-h, 36px) * var(--logo-scale, 1));
  width: auto; display: block;
}
@media (max-width: 1100px) { .stats__logos { --logo-scale: .7; } }
@media (max-width: 860px)  { .stats__logos { --logo-scale: .72; } }
/* 手機兩欄：縮到兩個 logo 排得下一列，下方說明才會和左欄對齊 */
@media (max-width: 520px)  { .stats__logos { --logo-scale: .6; } }
.stats__unit { font-size: .6em; margin-left: .18em; letter-spacing: 0; white-space: nowrap; }   /* v1.41：「25+ Years」的 Years，數字的 60%（試過與數字同大，選定 60%） */   /* v1.41：「25+ Years」的 Years */
.stats__hl { color: var(--brand); font-weight: var(--fw-semi); white-space: nowrap; }              /* v1.41：說明文字裡的橘色強調字 */
.stats__label { margin-top: 10px; font-size: .88rem; color: var(--text-on-dark-2); }
@media (max-width: 860px) {
  .stats__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6) 0; }
  .stats__item:nth-child(odd) { border-left: 0; padding-left: 0; }
}

/* ================= 產業磁磚 / 橫向捲動 ================= */
.rail-wrap { position: relative; }
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(272px, 1fr);
  gap: var(--sp-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: var(--sp-4);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

.rail-nav { display: flex; gap: var(--sp-2); }
.rail-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-pill);
  transition: all .2s var(--ease);
}
.rail-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.rail-btn[disabled] { opacity: .3; pointer-events: none; }
.section--dark .rail-btn, .section--ink .rail-btn { border-color: var(--line-dark); color: var(--text-on-dark); }

.tile {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 320px;
  padding: var(--sp-5);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text-on-dark);
  background: var(--ink-700);
  isolation: isolate;
}
.tile__bg { position: absolute; inset: 0; z-index: -2; }
.tile__bg img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(17,24,35,.86), rgba(17,24,35,.22) 62%, rgba(17,24,35,.06));
  transition: background .35s var(--ease);
}
.tile:hover .tile__bg img { transform: scale(1.06); }
.tile:hover::after { background: linear-gradient(to top, rgba(210,96,15,.85), rgba(5,9,15,.45) 65%, rgba(5,9,15,.15)); }
.tile__title { font-size: 1.15rem; font-weight: var(--fw-bold); }
.tile__desc { margin-top: 8px; font-size: .87rem; color: var(--text-on-dark-2); }
.tile__more { margin-top: var(--sp-4); font-size: .82rem; font-weight: var(--fw-semi); color: var(--brand-soft); }

/* ================= 解決方案（左右分割大卡） ================= */
.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
}
.split + .split { margin-top: var(--sp-9); }
.split--reverse .split__media { order: -1; }
.split__body > * + * { margin-top: var(--sp-4); }
.split__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--ink-700);
}
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__badge {
  position: absolute; left: var(--sp-4); top: var(--sp-4);
  padding: 6px 14px;
  background: var(--brand); color: #fff;
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: .1em; text-transform: uppercase;
  border-radius: var(--radius-pill);
}
.bullets { display: grid; gap: 10px; }
.bullets li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: .95rem; color: var(--text-on-light-2);
}
.section--dark .bullets li, .section--ink .bullets li { color: var(--text-on-dark-2); }
.bullets li::before {
  content: ""; flex: none;
  width: 7px; height: 7px; margin-top: .55em;
  background: var(--brand);
  border-radius: 2px; transform: rotate(45deg);
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
}

/* ================= 卡片（精選 / Insights / News） ================= */
.card {
  display: flex; flex-direction: column;
  background: var(--surface-0);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--brand); }
.section--dark .card, .section--ink .card {
  background: var(--ink-700); border-color: var(--line-dark); color: var(--text-on-dark);
}
.card__media { aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: var(--sp-5); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__tag {
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--brand);
}
.card__title { font-size: 1.06rem; font-weight: var(--fw-semi); line-height: 1.35; }
.card__desc { font-size: .9rem; color: var(--text-on-light-2); }
.section--dark .card__desc, .section--ink .card__desc { color: var(--text-on-dark-2); }
.card__foot { margin-top: auto; padding-top: var(--sp-3); }

/* ================= News 清單 ================= */
.news-list { border-top: 1px solid var(--line-light); }
.news-item {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--line-light);
  transition: padding-inline .25s var(--ease), background .25s var(--ease);
}
.news-item:hover { background: var(--surface-1); padding-inline: var(--sp-4); }
.news-item__date { font-size: .85rem; color: var(--text-on-light-3); font-variant-numeric: tabular-nums; }
.news-item__title { font-size: 1.05rem; font-weight: var(--fw-semi); }
.news-item__cta { color: var(--brand); font-size: .85rem; font-weight: var(--fw-semi); }
@media (max-width: 640px) {
  .news-item { grid-template-columns: 1fr; gap: 6px; }
  .news-item__cta { display: none; }
}

/* ================= 大型 CTA ================= */
.cta {
  position: relative;
  background: linear-gradient(120deg, var(--ink-900) 0%, var(--ink-700) 55%, var(--brand-strong) 165%);
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  padding: clamp(36px, 5vw, 72px);
  display: grid; grid-template-columns: 1.3fr 1fr;
  align-items: center; gap: var(--sp-7);
  overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; right: -80px; top: -80px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, var(--brand-tint), transparent 70%);
}
.cta__body { position: relative; }
.cta__body > * + * { margin-top: var(--sp-4); }
.cta__actions { position: relative; display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: flex-end; }
@media (max-width: 860px) {
  .cta { grid-template-columns: 1fr; }
  .cta__actions { justify-content: flex-start; }
}

/* ================= 內頁 page hero ================= */
.page-hero {
  background: var(--ink-900);
  color: var(--text-on-dark);
  padding: calc(var(--header-h) + var(--sp-8)) 0 var(--sp-8);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(to right, var(--brand), transparent 60%);
}
.page-hero__body { max-width: 820px; }
.page-hero__body > * + * { margin-top: var(--sp-4); }
.crumbs { display: flex; gap: 10px; font-size: var(--fs-xs); color: var(--text-on-dark-3); }
.crumbs a:hover { color: var(--brand); }

/* ================= 長文排版 ================= */
.prose { max-width: 76ch; }
.prose > * + * { margin-top: var(--sp-4); }
.prose h2 { font-size: var(--fs-h3); font-weight: var(--fw-bold); margin-top: var(--sp-7); }
.prose h3 { font-size: var(--fs-h4); font-weight: var(--fw-semi); margin-top: var(--sp-6); }
.prose p  { color: var(--text-on-light-2); }
.prose strong { color: var(--text-on-light); font-weight: var(--fw-semi); }

/* ================= 表格 ================= */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 520px; }
table.data th, table.data td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line-light); }
table.data thead th { background: var(--ink-800); color: var(--text-on-dark); font-weight: var(--fw-semi); }
table.data tbody tr:hover { background: var(--surface-1); }

/* ================= 表單 ================= */
.form-row { display: grid; gap: var(--sp-4); grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--text-on-light-3); }
.field input, .field textarea, .field select {
  font: inherit; padding: 12px 14px;
  border: 1px solid var(--line-light); border-radius: var(--radius-sm);
  background: var(--surface-0); color: var(--text-on-light);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ================= Cookie 條 ================= */
.cookiebar {
  position: fixed; left: var(--gutter); right: var(--gutter); bottom: 20px;
  z-index: var(--z-modal);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4);
  justify-content: space-between;
  background: var(--ink-800); color: var(--text-on-dark);
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: var(--shadow-lg);
}
.cookiebar[hidden] { display: none; }
.cookiebar p { font-size: .88rem; color: var(--text-on-dark-2); max-width: 68ch; }
