/* ===========================
   Header (Blackmagic-style) — merged desktop
   =========================== */
.bm-header{
  position: sticky;        /* 保持吸頂 */
  top: 0;
  z-index: 5000;           /* 高於內容，低於語言 Portal（若有） */
  overflow: visible;       /* 關鍵：讓下拉不被裁切 */
  background: rgba(10,10,10,.92);
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: saturate(120%) blur(8px);
  font-size: 1rem;         /* 統一字級 */
}
.bm-header .nav{
  display:grid; grid-template-columns: auto 1fr auto;
  align-items:center; gap:20px; height:72px;
}
.bm-header .brand{ color:#fff; text-decoration:none; font-weight:600; }
.bm-header .brand-text{ letter-spacing:.2px; }

/* nav links */
.bm-header .nav-links{
  display:flex; justify-content:center; gap:28px;
  list-style:none; margin:0; padding:0;
}
.bm-header .nav-links a{
  position:relative; color:#b8c0cf; text-decoration:none; font-size:1rem;
  transition: color .2s ease;
}
.bm-header .nav-links a:hover{ color:#fff; }
.bm-header .nav-links a.active{ color:var(--brand-gold); }
.bm-header .nav-links a::after{
  content:""; position:absolute; left:0; right:0; bottom:-8px; height:2px;
  background: currentColor; transform: scaleX(0);
  transform-origin: center; transition: transform .2s ease;
}
.bm-header .nav-links a:hover::after{ transform: scaleX(1); }

/* actions */
.bm-header .nav-actions{ display:flex; align-items:center; gap:12px; }

/* CTA */
.bm-cta{
  display:inline-flex; align-items:center; gap:8px;
  background: var(--brand-gold); color:#000 !important;
  border-radius:999px; padding:10px 16px; font-weight:700; text-decoration:none;
  box-shadow:0 6px 18px rgba(212,175,55,.22);
  transition: transform .12s ease, box-shadow .12s ease, background .2s ease;
  font-size:.95rem;
}
.bm-cta:hover{ transform:translateY(-1px); box-shadow:0 10px 26px rgba(212,175,55,.28); }
.bm-cta .emoji{ filter:drop-shadow(0 1px 1px rgba(0,0,0,.25)); }

/* 保證容器不裁切 dropdown */
.container { position: relative; overflow: visible; }

/* ===========================
   Language Dropdown — merged desktop
   =========================== */
.lang-dropdown{ position:relative; display:inline-block; }

.lang-btn{
  display:inline-flex; align-items:center; gap:6px;
  background:transparent; border:1px solid rgba(255,255,255,.15);
  color:#e7ecf3; padding:6px 12px; border-radius:8px;
  font-size:.95rem; cursor:pointer;
  transition:border-color .2s, color .2s, background .2s;
}
.lang-btn:hover{
  border-color:var(--brand-cyan); color:var(--brand-cyan);
  background:rgba(255,255,255,.05);
}
.lang-btn .caret{ font-size:.7rem; margin-left:4px; }

/* 讓清單從按鈕右下角展開，不被裁切 */
.lang-menu{
  position:absolute; top:110%; right:0;
  z-index: 9000;                          /* 高於 header/nav links */
  background:#0d0d0d; border:1px solid rgba(255,255,255,.12);
  border-radius:10px; box-shadow:0 6px 18px rgba(0,0,0,.35);
  padding:10px; margin:0; list-style:none;
  display:none;
  min-width:360px;
  grid-template-columns:repeat(3, minmax(120px,1fr));
  gap:6px 16px;
}
.lang-menu.open{ display:grid; }
.lang-menu li{
  padding:6px 8px; border-radius:6px; cursor:pointer; font-size:.9rem; color:#e7ecf3;
  transition:background .2s, color .2s; white-space:nowrap;
}
.lang-menu li:hover{ background:rgba(255,255,255,.08); color:var(--brand-gold); }
.lang-menu li[aria-current="true"]{ font-weight:600; color:var(--brand-gold); }

/* ===========================
   Footer (五欄式) — merged desktop
   =========================== */
.bm-footer{
  background:#0d0d0d;
  border-top:1px solid rgba(255,255,255,.06);
  color:#a9b2c3;
  font-size:.95rem;
}
.bm-footer .container { position: relative; overflow: visible; }

.bm-footer-top{
  display:grid;
  grid-template-columns: minmax(220px,1fr) repeat(4, minmax(160px,1fr));
  gap:28px 48px; align-items:start; padding:48px 0;
}
.bm-foot-links-grid{ display:contents; }

/* 品牌區 */
.bm-foot-brand .brand.mini{
  display:inline-flex; align-items:center; gap:8px;
  color:#fff; text-decoration:none; font-weight:600;
}
.bm-foot-brand .tagline{ margin-top:10px; font-size:.92rem; color:#b8c0cf; line-height:1.5; }

/* 各欄標題與連結 */
.bm-foot-links-grid h4{ font-size:.95rem; margin:0 0 10px; color:#fff; }
.bm-foot-links-grid a{
  display:block; margin:4px 0; color:#b8c0cf; text-decoration:none;
  transition:color .2s;
}
.bm-foot-links-grid a:hover{ color:var(--brand-gold); }

/* 下方法律列 */
.bm-footer-bottom{
  border-top:1px solid rgba(255,255,255,.06);
  display:flex; justify-content:space-between; align-items:center;
  gap:12px; flex-wrap:wrap; padding:16px 0; font-size:.9rem; color:#8993a3;
}
.bm-footer-bottom .legal a{
  margin-right:16px; color:#b8c0cf; text-decoration:none;
}
.bm-footer-bottom .legal a:hover{ color:var(--brand-gold); }

/* ===== Global backdrop ===== */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 998;             /* 在內容之上、在抽屜/portal 之下 */
}
.backdrop.show {
   display:block;
  opacity: 1;
  pointer-events: auto;
}

/* 鎖捲動 */
body.no-scroll { overflow: hidden; }

/* 讓層級關係清楚：portal > nav 抽屜 > backdrop */
.nav-links.open { z-index: 10000; }
.lang-portal.open { z-index: 10001; }

/* 預設隱藏漢堡 */
.nav-toggle { display: none; }

/* 布局：左 = 品牌；中 = 空白撐開；右 = 操作/漢堡 */
.bm-header .nav{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 56px;             /* 你要 72px 也可以 */
  gap: 12px;
  padding: 0 12px;
}

/* 品牌固定靠左，Logo 與文字並排 */
.bm-header .brand{
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #fff;
  margin: 0;                /* 防止被外部樣式置中 */
}

/* 漢堡固定在右側 */
.bm-header .nav-toggle{
  justify-self: end;         /* 在 grid 的右邊 */
  display: none;             /* 預設隱藏（桌機不出現） */
  width: 36px; height: 36px; /* 給觸控範圍 */
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  cursor: pointer;
}

/* === Header 底色 + 玻璃感 === */
.bm-header{
  position: sticky; top: 0; z-index: 1100;
  background: rgba(12,12,12,.88);
  backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* === 內層排版：左品牌｜中選單｜右動作 === */
.bm-header .nav{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 64px;                 /* 比 72px 更精緻 */
  gap: 16px;
  padding-inline: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

/* 品牌：字距微調、圖文間距 */
.bm-header .brand{
  display:flex; align-items:center; gap:10px;
  color:#fff; text-decoration:none; font-weight:600;
  letter-spacing:.2px;
}
.bm-header .brand img{ width:28px; height:28px; }
.bm-header .brand-text{ font-size:1.02rem; }

/* === 主選單 === */
.bm-header .nav-links{
  display:flex; justify-content:center; gap:22px;
  list-style:none; padding:0; margin:0;
}
.bm-header .nav-links a{
  position:relative;
  display:inline-block;
  padding:10px 8px;             /* 點擊面積 */
  color:#b8c0cf; text-decoration:none; font-size:1rem;
  border-radius:10px;
  transition: color .18s ease, background .18s ease;
}
.bm-header .nav-links a:hover{
  color:#fff; background: rgba(255,255,255,.06);
}
/* 低調的底線指示（hover/active） */
.bm-header .nav-links a::after{
  content:""; position:absolute; left:10px; right:10px; bottom:6px; height:2px;
  background: currentColor; transform: scaleX(0); transform-origin:center;
  transition: transform .18s ease;
}
.bm-header .nav-links a:hover::after{ transform: scaleX(1); }
.bm-header .nav-links a.active{
  color: var(--brand-gold);
}
.bm-header .nav-links a.active::after{
  transform: scaleX(1);
  background: var(--brand-gold);
}

/* === 右側動作區 === */
.bm-header .nav-actions{ display:flex; align-items:center; gap:10px; }

/* 語言按鈕 */
.lang-btn{
  display:inline-flex; align-items:center; gap:8px;
  height: 36px; padding: 0 12px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.12);
  color:#e7ecf3; border-radius:10px; font-size:.95rem;
  transition: border-color .18s, color .18s, background .18s;
}
.lang-btn:hover{ border-color: var(--brand-cyan); color: var(--brand-cyan); }
.lang-btn .caret{ font-size:.7rem; opacity:.9; }

/* CTA：細緻陰影 + 焦點環 */
.bm-cta{
  display:inline-flex; align-items:center; gap:8px;
  height: 38px; padding: 0 16px;
  background: var(--brand-gold); color:#000 !important; font-weight:700;
  border-radius: 999px; text-decoration:none;
  box-shadow: 0 10px 26px rgba(212,175,55,.22);
  transition: transform .12s ease, box-shadow .12s ease, background .18s ease;
}
.bm-cta:hover{ transform: translateY(-1px); box-shadow: 0 14px 30px rgba(212,175,55,.28); }
.bm-cta:focus-visible{ outline: 2px solid #fff; outline-offset: 2px; }

/* 避免重複的 Try Web App（同一列只留第一顆） */
.nav-actions .bm-cta:not(:first-of-type){ display:none !important; }

/* === 漢堡（桌機隱藏、手機顯示） === */
.bm-header .nav-toggle{
  justify-self: end;
  display: none;
  width:36px; height:36px; border-radius:10px;
  align-items:center; justify-content:center;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  color:#e7ecf3; cursor:pointer;
  transition: background .18s ease, border-color .18s ease;
}
.bm-header .nav-toggle:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.16);
}

/* 手機：顯示漢堡、隱藏桌機 CTA（你需求） */
@media (max-width: 980px){
  .bm-header .nav-toggle{ display: inline-flex; }
  .bm-cta{ display:none !important; }
  .bm-header .nav{ height: 56px; gap:12px; padding-inline:12px; }
  .bm-header .brand img{ width:24px; height:24px; }
  .bm-header .brand-text{ font-size:.98rem; }
  .bm-header .nav-links{ display:none; }            /* 交給 .open 狀態控制 */
  .bm-header .nav-links.open{
    position:absolute; left: 12px; right:12px; top: calc(56px + 6px);
    background:#0f0f0f; border:1px solid rgba(255,255,255,.08);
    border-radius:12px; padding:12px;
    display:flex; flex-direction:column; gap:6px;
    box-shadow: 0 18px 40px rgba(0,0,0,.5);
    z-index: 1200;                                  /* 避免被 backdrop 蓋住 */
  }
}

/* === Backdrop（手機才會用；確保在選單之下） === */
.nav-backdrop{
  position: fixed; inset:0; background: rgba(0,0,0,.45);
  backdrop-filter: blur(1px);
  display:none; z-index: 1100; /* 低於 .nav-links.open 的 1200，高於頁面 */
}
.nav-backdrop.show{ display:block; }

/* Apple-style footer */
.apple-footer {
  background: #f5f5f7;
  color: #1d1d1f;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 40px;
  border-top: 1px solid #d2d2d7;
}

.apple-footer a {
  color: #424245;
  text-decoration: none;
}
.apple-footer a:hover {
  text-decoration: underline;
  color: #000;
}

.apple-footer-top {
  padding: 24px 0;
}

.apple-foot-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(120px,1fr));
  gap: 24px;
}

.apple-foot-links-grid h4 {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #6e6e73;
}

.apple-foot-links-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.apple-foot-links-grid li {
  margin-bottom: 4px;
}

.apple-footer-bottom {
  border-top: 1px solid #d2d2d7;
  padding: 12px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #6e6e73;
}

.apple-footer-bottom .legal-links a {
  margin-left: 16px;
  color: #6e6e73;
}
.apple-footer-bottom .legal-links a:hover {
  color: #000;
}

.apple-footer-locale {
  border-top: 1px solid #d2d2d7;
  padding: 14px 0;
  font-size: 12px;
  color: #6e6e73;
  display: flex;
  align-items: center;
  gap: 8px;
}

.apple-footer-locale .locale-icon {
  font-size: 14px;
}

.apple-footer-locale select {
  background: transparent;
  border: 1px solid #d2d2d7;
  padding: 4px 8px;
  font-size: 12px;
  color: #1d1d1f;
  border-radius: 6px;
  cursor: pointer;
}
.apple-footer-locale select:focus {
  outline: none;
  border-color: #000;
}

.ks-footer {
  background: #0f0f15; /* 深黑背景 */
  color: #e7ecf3;      /* 主文字色 */
  font-size: 0.85rem;
  line-height: 1.6;
  border-top: 1px solid var(--border);
}

.ks-footer a {
  color: #e7ecf3;
  opacity: 0.85;
  text-decoration: none;
}
.ks-footer a:hover {
  opacity: 1;
  color: var(--accent); /* 高亮用你的藍金 accent */
}

.ks-foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(160px,1fr));
  gap: 24px;
  padding: 32px 0;
}

.ks-foot-grid h4 {
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--accent); /* 小標題用金/亮色 */
}

.ks-foot-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ks-foot-grid li {
  margin: 4px 0;
}

.ks-footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* 語言選單 Apple-style */
.footer-locale select {
  background: #171a21;
  color: #e7ecf3;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  appearance: none;
  cursor: pointer;
}
.footer-locale select:focus {
  outline: 2px solid var(--accent);
}

/* === Hero modern (HeyGen-like) === */
.hero-modern{
  display:grid; grid-template-columns: 1.05fr .95fr; gap: 40px;
  align-items:center; padding-top: 120px; padding-bottom: 80px;
}
.hero-modern .hero-left .eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px; font-size:.85rem; letter-spacing:.2px;
  background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.10);
  border-radius:999px; margin-bottom:10px; color:#e7ecf3;
}
.hero-modern h1{ font-size: clamp(2.2rem, 3vw, 3rem); line-height:1.08; margin: 6px 0 10px; }
.hero-modern .sub{ font-size: 1.1rem; opacity:.9; margin: 0 0 16px; max-width: 40ch; }
.hero-stats{ display:flex; flex-wrap:wrap; gap:10px 14px; margin: 6px 0 18px; padding:0; list-style:none; }
.hero-stats li{
  padding:6px 10px; border:1px solid rgba(255,255,255,.12);
  border-radius:999px; font-size:.9rem; opacity:.95;
  background: rgba(10,10,10,.4);
}
.hero-modern .cta-row{ display:flex; gap:12px; align-items:center; margin-top: 2px; }

.hero-right .mock-wrap{ position:relative; }
.mock-window{
  position:relative; border-radius: 16px; overflow:hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(22,22,24,.9), rgba(12,12,14,.9));
  box-shadow: 0 18px 40px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.04);
  transform: translateZ(0);
}
.mock-chrome{
  display:flex; align-items:center; gap:10px; height:40px; padding:0 12px;
  background: rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.08);
}
.mock-chrome .dot{ width:10px; height:10px; border-radius:50%; display:inline-block; opacity:.9; }
.mock-chrome .red{ background:#ff5f56; } .mock-chrome .yellow{ background:#ffbd2e; } .mock-chrome .green{ background:#27c93f; }
.mock-chrome .url{
  font-size:.85rem; opacity:.9; padding:4px 8px; border-radius:8px;
  background: rgba(0,0,0,.25); border:1px solid rgba(255,255,255,.08);
}
.mock-screen{ padding: 8px; }
.mock-screen img{ display:block; width:100%; height:auto; border-radius: 12px; }

.mock-glow{
  position:absolute; inset:auto 10% -8% 10%;
  height:26%; filter: blur(32px); opacity:.85;
  background: radial-gradient(80% 80% at 50% 10%, rgba(245, 211, 122, .35), rgba(0,0,0,0) 70%);
  pointer-events:none;
}

/* Feature modern */
.feature-modern{
  display:grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items:center;
  padding: 36px 0;
}
.feature-modern.reverse{ direction:ltr; }
.feature-modern .feature-media{ order: 1; }
.feature-modern.reverse .feature-media{ order: 2; }
.feature-modern .feature-text{ order: 2; }
.feature-modern.reverse .feature-text{ order: 1; }

.media-card{
  border-radius:16px; overflow:hidden; position:relative;
  background: linear-gradient(180deg, rgba(22,22,24,.9), rgba(12,12,14,.9));
  border:1px solid rgba(255,255,255,.10);
  box-shadow: 0 14px 34px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.04);
  padding: 10px;
}
.media-card img{ display:block; width:100%; height:auto; border-radius:12px; }

/* --- Brand 基礎 --- */
.brand { display:flex; align-items:center; gap:8px; text-decoration:none; color:inherit; }
.brand-icon { display:block; width:auto; height:28px; }

/* Header：手機只顯示圖示 */
@media (max-width: 420px){
  .bm-header .brand-text { display:none; }
}

/* Footer：品牌區放大、拉開呼吸感 */
.ks-foot-brand .brand-icon { height:32px; }
.ks-foot-brand .brand-text { font-size:1.1rem; font-weight:700; }

/* About hero：單字 + 小圖示 */
.about-hero-title {
  display:flex; align-items:center; gap:10px; margin:0 0 6px;
}
.about-hero-icon {
  width:28px; height:28px; opacity:.95;
}

/* 深色系頁腳的品牌金色互動（可選） */
.ks-footer .brand:hover .brand-text { color:#d4af37; }
