/* ==========================================================================
   NotchNook 粵語官網 —— 公共樣式 common.css
   主題色：#16131C / #6C1D7E / #D89CFF ｜ 深色主題
   僅使用系統字體，不引入 Google 字體
   ========================================================================== */

:root {
  --brand: #6C1D7E;
  --brand-light: #D89CFF;
  --brand-mid: #9B4DCA;
  --brand-rgb: 108, 29, 126;
  --accent-rgb: 216, 156, 255;

  --bg: #16131C;
  --bg-elev: #1C1725;
  --bg-card: #221A2E;
  --bg-card-2: #2A2038;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-brand: rgba(var(--accent-rgb), 0.28);

  --text: #F4EEFB;
  --text-soft: #BDB2CE;
  --text-dim: #847896;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-brand: 0 14px 44px rgba(var(--brand-rgb), 0.55);

  --maxw: 1200px;
  --nav-h: 74px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
video { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; position: relative; }
.section--tight { padding: 64px 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-light);
  margin: 0 0 16px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-light), transparent);
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.section-title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--brand-light), var(--brand-mid));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-sub {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--text-soft);
  max-width: 720px;
  margin: 0;
}
.text-center .section-sub { margin: 0 auto; }

.text-center { text-align: center; }
.text-brand { color: var(--brand-light); }

/* ---------- 通用按鈕 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease,
    border-color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary {
  background: linear-gradient(135deg, var(--brand-light), var(--brand-mid) 55%, var(--brand));
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 52px rgba(var(--brand-rgb), 0.7);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-brand);
  transform: translateY(-2px);
}
.btn--lg { padding: 16px 34px; font-size: 16px; }

/* ---------- 通用卡片 ---------- */
.card {
  background: linear-gradient(180deg, var(--bg-card), rgba(34, 26, 46, 0.6));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-brand);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(var(--accent-rgb), 0.08);
}

/* ==========================================================================
   導航欄 header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(22, 19, 28, 0.7);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(22, 19, 28, 0.86);
}

.nav {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nav__logo {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  box-shadow: 0 4px 16px rgba(var(--brand-rgb), 0.45);
}
.nav__brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.nav__brand-name { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.nav__brand-by { font-size: 11px; color: var(--text-dim); font-weight: 500; }

.nav__menu { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: block;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-soft);
  transition: color .2s ease, background .2s ease;
}
.nav__link:hover, .nav__link.is-active {
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.1);
}

.nav__actions { display: flex; align-items: center; gap: 12px; }
.nav__actions .btn { padding: 10px 20px; font-size: 14px; }
.nav__actions .btn svg { width: 16px; height: 16px; }

/* 語言切換 */
.lang-switch { position: relative; }
.lang-switch__btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-strong);
  color: var(--text-soft); font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.lang-switch__btn:hover { color: var(--text); background: rgba(var(--accent-rgb), .1); border-color: var(--border-brand); }
.lang-switch__btn svg { width: 17px; height: 17px; flex: none; }
.lang-switch__btn svg:last-child { width: 14px; height: 14px; opacity: .6; transition: transform .25s ease; }
.lang-switch.is-open .lang-switch__btn svg:last-child { transform: rotate(180deg); }
.lang-switch__menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 150px;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  border-radius: 14px; background: var(--bg-card-2); border: 1px solid var(--border);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease; z-index: 60;
}
.lang-switch.is-open .lang-switch__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-switch__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: 9px;
  font-size: 14px; color: var(--text-soft); transition: color .2s ease, background .2s ease;
}
.lang-switch__item:hover { color: var(--text); background: rgba(var(--accent-rgb), .1); }
.lang-switch__item.is-active { color: var(--brand-light); background: rgba(var(--brand-rgb), .3); font-weight: 600; }
.lang-switch__check { display: inline-flex; width: 16px; height: 16px; flex: none; color: var(--brand-light); }
.lang-switch__check svg { width: 16px; height: 16px; }

/* 移動端語言切換 */
.mobile-lang { display: flex; flex-wrap: wrap; gap: 8px; }
.mobile-lang__item {
  padding: 9px 15px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
  font-size: 14px; color: var(--text-soft); transition: color .2s ease, background .2s ease;
}
.mobile-lang__item.is-active {
  color: var(--brand-light); font-weight: 600;
  background: rgba(var(--accent-rgb), .14); border-color: var(--border-brand);
}

/* 漢堡按鈕 */
.nav__burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  position: relative;
  transition: border-color .2s ease, background .2s ease;
}
.nav__burger:hover { border-color: var(--border-brand); background: rgba(var(--accent-rgb), 0.08); }
.nav__burger span {
  position: absolute;
  left: 50%; top: 50%;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform .3s ease, opacity .2s ease;
}
.nav__burger span:nth-child(1) { transform: translate(-50%, -7px); }
.nav__burger span:nth-child(3) { transform: translate(-50%, 5px); }
body.menu-open .nav__burger span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
body.menu-open .nav__burger span:nth-child(2) { opacity: 0; }
body.menu-open .nav__burger span:nth-child(3) { transform: translate(-50%, -50%) rotate(-45deg); }

/* 移動端彈出菜單：自頂部展開的 "Nook" 面板，呼應產品形態 */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  visibility: hidden;
  pointer-events: none;
}
.mobile-menu__overlay {
  position: absolute; inset: 0;
  background: rgba(10, 8, 14, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .35s ease;
}
.mobile-menu__panel {
  position: absolute;
  top: 0; left: 0; right: 0;
  max-height: 92vh;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(var(--brand-rgb), 0.5), transparent 70%),
    linear-gradient(180deg, #241B31, var(--bg-elev));
  border-bottom: 1px solid var(--border-brand);
  border-radius: 0 0 34px 34px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
  padding: calc(var(--nav-h) + 14px) 22px 30px;
  transform: translateY(-102%);
  transition: transform .45s cubic-bezier(.16, 1, .3, 1);
  overflow-y: auto;
}
/* 面板底部的劉海小把手，呼應產品 */
.mobile-menu__panel::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 10px;
  width: 74px; height: 5px;
  transform: translateX(-50%);
  border-radius: 5px;
  background: rgba(var(--accent-rgb), 0.4);
}
body.menu-open .mobile-menu { visibility: visible; pointer-events: auto; }
body.menu-open .mobile-menu__overlay { opacity: 1; }
body.menu-open .mobile-menu__panel { transform: translateY(0); }
body.menu-open { overflow: hidden; }

.mobile-menu__brand {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 6px 16px;
}
.mobile-menu__brand img { width: 34px; height: 34px; border-radius: 9px; }
.mobile-menu__brand .n { font-size: 15px; font-weight: 800; }
.mobile-menu__brand .b { font-size: 11px; color: var(--text-dim); line-height: 1.2; }

.mobile-menu__label {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim); margin: 14px 4px 4px;
}
.mobile-menu__links { display: flex; flex-direction: column; gap: 8px; }
.mobile-menu__link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px;
  border-radius: 16px;
  font-size: 17px; font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.mobile-menu__link:hover {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: var(--border-brand);
  transform: translateX(4px);
}
.mobile-menu__link.is-active {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: var(--border-brand);
}
.mobile-menu__link.is-active span { color: var(--brand-light); }
.mobile-menu__link svg { width: 18px; height: 18px; opacity: .5; }

.mobile-menu__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.mobile-menu__actions .btn { width: 100%; }

.mobile-menu__contact {
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px dashed var(--border-brand);
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu__contact b { color: var(--text-soft); font-weight: 600; }

/* ==========================================================================
   頁腳 footer
   ========================================================================== */
.site-footer {
  position: relative;
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  padding: 76px 0 40px;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -160px; left: 50%;
  width: 720px; height: 340px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(var(--brand-rgb), 0.34), transparent 70%);
  pointer-events: none;
}
.footer-inner { position: relative; z-index: 1; }

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 42px;
  border-bottom: 1px solid var(--border);
}
.footer-brand { max-width: 440px; }
.footer-brand__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.footer-brand__logo {
  width: 50px; height: 50px; border-radius: 14px;
  box-shadow: 0 8px 24px rgba(var(--brand-rgb), 0.5);
}
.footer-brand__name { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.footer-brand__by { font-size: 12.5px; color: var(--text-dim); }
.footer-brand__desc { color: var(--text-soft); font-size: 14.5px; margin: 0; }

.footer-contact { display: flex; flex-direction: column; gap: 14px; }
.footer-contact__item {
  display: flex; align-items: center; gap: 14px;
  font-size: 15px; color: var(--text-soft);
}
.footer-contact__icon {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid var(--border-brand);
  color: var(--brand-light);
}
.footer-contact__icon svg { width: 19px; height: 19px; }
.footer-contact__item b { color: var(--text); font-weight: 700; }

.footer-reseller {
  margin-top: 36px;
  padding: 22px 26px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.22), rgba(var(--accent-rgb), 0.06));
  border: 1px solid var(--border-brand);
  font-size: 13.5px;
  color: var(--text-soft);
}
.footer-reseller p { margin: 0 0 6px; }
.footer-reseller p:last-child { margin-bottom: 0; }
.footer-reseller .en { color: var(--text-dim); font-size: 12.5px; }
.footer-reseller b { color: var(--brand-light); }

.footer-bottom {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* ==========================================================================
   響應式
   ========================================================================== */
@media (max-width: 980px) {
  .nav__menu { display: none; }
  .nav__actions .btn, .nav__actions .lang-switch { display: none; }
  .nav__burger { display: block; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .container { padding: 0 18px; }
  .nav__brand-by { display: none; }
  .footer-top { flex-direction: column; }
}
