/* ==========================================================================
   HKAPTA 香港亞太珍寶拍賣中心 · 全站基礎樣式
   ========================================================================== */

:root {
  --ink: #1A1A1A;
  --ink-2: #232323;
  --ink-3: #2B2B28;
  --paper: #F8F5F0;
  --paper-2: #F0EBE1;
  --card: #FFFFFF;
  --gold: #B8860B;
  --gold-2: #C9A961;
  --gold-3: #E4CE9A;
  --line: #E2DACA;
  --line-dark: rgba(201, 169, 97, 0.22);
  --text: #2A2521;
  --muted: #756D5F;
  --muted-dark: rgba(248, 245, 240, 0.62);
  --seal: #9E2B25;
  --font-serif: "Noto Serif SC", "Songti SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", sans-serif;
  --font-num: "Cormorant Garamond", "Noto Serif SC", serif;
  --header-h: 80px;
}

/* ---- Reset ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--paper);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }
::selection { background: var(--gold-2); color: var(--ink); }

/* 內頁預留頭部空間（首頁由透明頭部覆蓋） */
body:not([data-hero]) { padding-top: var(--header-h); }

/* ---- 佈局工具 ---- */
.container { width: min(1200px, 92%); margin-inline: auto; }
.section { padding: 96px 0; }
.section-tight { padding: 72px 0; }
.section-dark { background: var(--ink); color: var(--muted-dark); }
.section-dark .section-title { color: var(--paper); }
.section-dark .section-desc { color: var(--muted-dark); }
.section-dark .kicker { color: var(--gold-2); }
.section-alt { background: var(--paper-2); }

/* ---- 章節標題 ---- */
.section-head { max-width: 660px; margin-bottom: 60px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.35em;
}
.kicker::before { content: ""; width: 36px; height: 1px; background: var(--gold); }
.section-head.center .kicker::after { content: ""; width: 36px; height: 1px; background: var(--gold); }
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0.04em;
  margin: 16px 0 14px;
  color: var(--ink);
}
.section-desc { color: var(--muted); font-size: 16px; text-wrap: pretty; }

/* ---- 按鈕 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 36px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.18em;
  border: 1px solid transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-3), var(--gold-2) 45%, var(--gold));
  color: var(--ink);
  box-shadow: 0 6px 22px rgba(184, 134, 11, 0.35);
}
.btn-gold:hover { box-shadow: 0 10px 28px rgba(184, 134, 11, 0.45); }
.btn-line { border-color: rgba(201, 169, 97, 0.55); color: var(--gold-2); background: rgba(201, 169, 97, 0.05); }
.btn-line:hover { background: rgba(201, 169, 97, 0.16); border-color: var(--gold-2); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #333; }
.btn-outline-ink { border-color: var(--ink); color: var(--ink); }
.btn-outline-ink:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 11px 24px; font-size: 13px; letter-spacing: 0.15em; }

.link-more {
  display: inline-flex;
  align-items: center;
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.14em;
  font-weight: 500;
  transition: color 0.3s ease;
}
.link-more::after { content: "→"; margin-left: 10px; transition: transform 0.3s ease; }
.link-more:hover { color: var(--gold-2); }
.link-more:hover::after { transform: translateX(6px); }
.section-dark .link-more { color: var(--gold-2); }

/* ---- 印章 ---- */
.seal-mark {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  background: var(--seal);
  color: #F8F1E9;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.15;
  display: grid;
  place-items: center;
  writing-mode: vertical-rl;
  letter-spacing: 0.1em;
  box-shadow: 0 4px 16px rgba(158, 43, 37, 0.4);
  border-radius: 4px;
}

/* ==========================================================================
   頂部導航
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(23, 23, 23, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
  transition: background 0.4s ease, border-color 0.4s ease;
}
body[data-hero] .site-header { background: transparent; border-bottom-color: transparent; }
body[data-hero] .site-header.scrolled {
  background: rgba(23, 23, 23, 0.94);
  border-bottom-color: var(--line-dark);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand-seal {
  width: 42px;
  height: 42px;
  background: var(--seal);
  color: #F8F1E9;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border-radius: 3px;
  box-shadow: 0 3px 12px rgba(158, 43, 37, 0.45);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--font-serif); font-size: 21px; font-weight: 700; color: var(--paper); letter-spacing: 0.14em; }
.brand-text em { font-style: normal; font-size: 10px; letter-spacing: 0.3em; color: var(--gold-2); }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  position: relative;
  padding: 10px 14px;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: rgba(248, 245, 240, 0.82);
  transition: color 0.3s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 1px;
  background: var(--gold-2);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}
.main-nav a:hover { color: var(--gold-3); }
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav a.active { color: var(--gold-2); font-weight: 500; }
.main-nav a.active::after { transform: scaleX(1); }

.nav-toggle { display: none; flex-direction: column; gap: 6px; padding: 8px; }
.nav-toggle span { width: 26px; height: 1.5px; background: var(--gold-2); transition: transform 0.35s ease, opacity 0.35s ease; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ==========================================================================
   內頁頁頭 / 麪包屑
   ========================================================================== */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 68px;
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  border-bottom: 1px solid var(--line);
}
.breadcrumb { display: flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: 0.15em; color: var(--muted); }
.breadcrumb a { color: var(--muted); transition: color 0.3s ease; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb em { font-style: normal; color: var(--gold); }
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin: 22px 0 16px;
  line-height: 1.2;
}
.page-title::after { content: ""; display: block; width: 56px; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-2)); margin-top: 22px; }
.page-sub { max-width: 620px; color: var(--muted); font-size: 16px; text-wrap: pretty; }
.page-hero .ghost {
  position: absolute;
  right: 3%;
  bottom: -46px;
  font-family: var(--font-serif);
  font-size: 230px;
  font-weight: 900;
  line-height: 1;
  color: rgba(184, 134, 11, 0.07);
  pointer-events: none;
  user-select: none;
}

/* ==========================================================================
   頁腳
   ========================================================================== */
.site-footer { background: var(--ink); color: var(--muted-dark); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 48px;
  padding: 72px 0 56px;
}
.footer-brand p { margin-top: 22px; font-size: 14px; line-height: 2; text-wrap: pretty; }
.footer-col h4 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--gold-2);
  letter-spacing: 0.2em;
  margin-bottom: 22px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.footer-col ul a { color: var(--muted-dark); transition: color 0.3s ease, padding-left 0.3s ease; }
.footer-col ul a:hover { color: var(--gold-3); padding-left: 6px; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 26px 0;
  border-top: 1px solid var(--line-dark);
  font-size: 13px;
  letter-spacing: 0.05em;
}
.footer-note { font-family: var(--font-serif); color: var(--gold-2); letter-spacing: 0.3em; }

/* ==========================================================================
   動畫
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.85s ease, transform 0.85s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.12s; }
.reveal.d2 { transition-delay: 0.24s; }
.reveal.d3 { transition-delay: 0.36s; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulseRing {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   響應式 · 導航
   ========================================================================== */
@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #161616;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s ease;
    border-bottom: 0 solid transparent;
  }
  body.nav-open .main-nav { max-height: 480px; border-bottom: 1px solid var(--line-dark); }
  .main-nav a { padding: 16px 6%; border-bottom: 1px solid rgba(201, 169, 97, 0.1); }
  .main-nav a::after { display: none; }
  .main-nav a.active { color: var(--gold-2); }
}

@media (max-width: 680px) {
  .section { padding: 68px 0; }
  .section-tight { padding: 52px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; padding: 56px 0 44px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .page-hero .ghost { font-size: 150px; bottom: -30px; }
  .btn { padding: 13px 28px; font-size: 14px; }
}
