/* 家和 J-ho 主選單（11-18 程寶⚙️分身）
   設計：中文用思源宋體（Noto Serif TC，僅選單用字的子集，自託管約 7KB）呼應字標與標題的襯線氣質；
   每項上方一行極小英文（Lato 字距拉開），目前所在頁＝黃銅細線＋英文轉黃銅；hover 時黃銅細線由中間向兩側展開。
   只靠本檔覆寫：不改選單資料、不動 functions.php／jho-content.css。由 header.php 在 wp_head 之後載入，排在所有樣式最後。 */

@font-face{font-family:'JHO Nav Serif';font-style:normal;font-weight:500;font-display:swap;src:url('assets/fonts/NotoSerifTC-jho-500.woff2') format('woff2')}

/* ── 三種標頭狀態的配色（用變數集中管理） ── */
html body .site-header{--nav-ink:#fff;--nav-dim:rgba(255,255,255,.80);--nav-en:rgba(255,255,255,.50);--nav-brass:#c9a46a;--nav-shadow:none}
/* 首頁透明疊大圖：加極淡上緣漸層＋字影，任何底圖上都讀得到 */
html body.home .site-header:not(.is-scrolled){background:linear-gradient(180deg,rgba(12,12,11,.55) 0%,rgba(12,12,11,.22) 60%,rgba(12,12,11,0) 100%);--nav-dim:rgba(255,255,255,.88);--nav-en:rgba(255,255,255,.62);--nav-shadow:0 1px 10px rgba(0,0,0,.35)}
/* 首頁往下捲：淺色底，改深字＋深一階的黃銅 */
html body.home .site-header.is-scrolled{--nav-ink:#1a1a19;--nav-dim:#3a3833;--nav-en:#8d8a82;--nav-brass:#a07c45;--nav-shadow:none}

/* ── 桌機 ── */
@media (min-width:721px){
  html body .site-header .topbar ul.primary-menu{gap:42px;align-items:center;font-size:17px}
  html body .site-header .topbar ul.primary-menu>li.menu-item>a{
    position:relative;display:inline-flex;flex-direction:column;align-items:center;
    padding:6px 0 11px .18em;
    font:500 17px/1.3 'JHO Nav Serif','Noto Serif TC','Source Han Serif TC','Songti TC','PMingLiU',serif;
    letter-spacing:.18em;color:var(--nav-dim);text-shadow:var(--nav-shadow);text-decoration:none;
    transition:color .35s ease}
  /* 小英文：上方一行 */
  html body .site-header .topbar ul.primary-menu>li.menu-item>a::before{
    display:block;margin:0 0 5px;padding-left:.36em;
    font:400 9.5px/1 Lato,'Helvetica Neue',Arial,sans-serif;letter-spacing:.36em;text-transform:uppercase;
    color:var(--nav-en);text-shadow:none;transition:color .35s ease,transform .35s ease;transform:translateY(1px)}
  /* 黃銅細線：預設收在中間，hover／目前頁展開 */
  html body .site-header .topbar ul.primary-menu>li.menu-item>a::after{
    content:"";position:absolute;left:.18em;right:.18em;bottom:0;height:1px;background:var(--nav-brass);
    transform:scaleX(0);transform-origin:50% 50%;transition:transform .35s cubic-bezier(.22,.61,.36,1)}
  html body .site-header .topbar ul.primary-menu>li.menu-item>a:hover,
  html body .site-header .topbar ul.primary-menu>li.menu-item>a:focus-visible{color:var(--nav-ink)}
  html body .site-header .topbar ul.primary-menu>li.menu-item>a:hover::before,
  html body .site-header .topbar ul.primary-menu>li.menu-item>a:focus-visible::before{color:var(--nav-brass);transform:translateY(-1px)}
  html body .site-header .topbar ul.primary-menu>li.menu-item>a:hover::after,
  html body .site-header .topbar ul.primary-menu>li.menu-item>a:focus-visible::after{transform:scaleX(1)}
}
@media (min-width:721px) and (max-width:1180px){
  html body .site-header .topbar ul.primary-menu{gap:26px}
  html body .site-header .topbar ul.primary-menu>li.menu-item>a{font-size:15.5px;letter-spacing:.12em;padding-left:.12em}
}
@media (min-width:721px) and (max-width:900px){
  html body .site-header .topbar ul.primary-menu{gap:16px}
  html body .site-header .topbar ul.primary-menu>li.menu-item>a{font-size:14.5px;letter-spacing:.06em}
  html body .site-header .topbar ul.primary-menu>li.menu-item>a::before{letter-spacing:.2em}
}

/* ── 英文對照（依連結網址／首頁類別選取，不改選單資料） ── */
html body .site-header ul.primary-menu>li.menu-item-home>a::before{content:"Home"}
html body .site-header ul.primary-menu>li.menu-item>a[href*="/about/"]::before{content:"Story"}
html body .site-header ul.primary-menu>li.menu-item>a[href*="/products/"]::before{content:"Collections"}
html body .site-header ul.primary-menu>li.menu-item>a[href*="/portfolio/"]::before{content:"Projects"}
html body .site-header ul.primary-menu>li.menu-item>a[href*="#catalog"]::before{content:"Catalogue"}
html body .site-header ul.primary-menu>li.menu-item>a[href*="/contact/"]::before{content:"Contact"}

/* ── 目前所在頁：WordPress 原生 current-menu-item；系列頁→產品系列、案例內頁→客戶案例 ── */
html body .site-header .topbar ul.primary-menu>li.menu-item.current-menu-item>a:not([href*="#"]),
html body.single-series .site-header .topbar ul.primary-menu>li.menu-item>a[href*="/products/"]:not([href*="#"]),
html body.single-case .site-header .topbar ul.primary-menu>li.menu-item>a[href*="/portfolio/"]{color:var(--nav-ink)}
html body .site-header .topbar ul.primary-menu>li.menu-item.current-menu-item>a:not([href*="#"])::before,
html body.single-series .site-header .topbar ul.primary-menu>li.menu-item>a[href*="/products/"]:not([href*="#"])::before,
html body.single-case .site-header .topbar ul.primary-menu>li.menu-item>a[href*="/portfolio/"]::before{color:var(--nav-brass)}
html body .site-header .topbar ul.primary-menu>li.menu-item.current-menu-item>a:not([href*="#"])::after,
html body.single-series .site-header .topbar ul.primary-menu>li.menu-item>a[href*="/products/"]:not([href*="#"])::after,
html body.single-case .site-header .topbar ul.primary-menu>li.menu-item>a[href*="/portfolio/"]::after{transform:scaleX(1)}

/* ── 手機：展開選單 ── */
@media (max-width:720px){
  html body .site-header .menu-toggle{font:500 16px/1 'JHO Nav Serif','Noto Serif TC','Songti TC',serif;letter-spacing:.24em}
  /* 母主題點擊後留下白色虛線焦點框，壓在「選單」字上像亂碼；滑鼠／觸控不顯示，鍵盤操作改黃銅細框 */
  html body .site-header .menu-toggle:focus{outline:none}
  html body .site-header .menu-toggle:focus-visible{outline:1px solid #c9a46a;outline-offset:6px}
  html body .site-header .topbar ul.primary-menu{
    --nav-ink:#fff;--nav-dim:rgba(255,255,255,.82);--nav-en:rgba(255,255,255,.42);--nav-brass:#c9a46a;
    padding:10px 32px 30px;gap:0}
  html body .site-header .topbar ul.primary-menu>li.menu-item{border-bottom:1px solid rgba(255,255,255,.08)}
  html body .site-header .topbar ul.primary-menu>li.menu-item:last-child{border-bottom:0}
  html body .site-header .topbar ul.primary-menu>li.menu-item>a{
    position:relative;display:flex;align-items:baseline;justify-content:space-between;
    padding:19px 0;
    font:500 21px/1.3 'JHO Nav Serif','Noto Serif TC','Source Han Serif TC','Songti TC','PMingLiU',serif;
    letter-spacing:.16em;color:var(--nav-dim);text-decoration:none;transition:color .3s ease,padding .35s ease}
  html body .site-header .topbar ul.primary-menu>li.menu-item>a::before{
    order:2;font:400 10px/1 Lato,'Helvetica Neue',Arial,sans-serif;letter-spacing:.32em;text-transform:uppercase;color:var(--nav-en)}
  html body .site-header .topbar ul.primary-menu>li.menu-item>a::after{
    content:"";position:absolute;left:0;top:50%;width:18px;height:1px;background:var(--nav-brass);
    transform:scaleX(0);transform-origin:0 50%;transition:transform .35s cubic-bezier(.22,.61,.36,1)}
  /* 目前所在頁：往右讓出一段，前方一條黃銅細線，英文轉黃銅 */
  html body .site-header .topbar ul.primary-menu>li.menu-item.current-menu-item>a:not([href*="#"]),
  html body.single-series .site-header .topbar ul.primary-menu>li.menu-item>a[href*="/products/"]:not([href*="#"]),
  html body.single-case .site-header .topbar ul.primary-menu>li.menu-item>a[href*="/portfolio/"]{padding-left:32px;color:var(--nav-ink)}
  /* 逐一淡入 */
  html body .site-header .topbar ul.primary-menu.is-open>li.menu-item{animation:jhoNavIn .5s cubic-bezier(.22,.61,.36,1) both}
  html body .site-header .topbar ul.primary-menu.is-open>li.menu-item:nth-child(1){animation-delay:.05s}
  html body .site-header .topbar ul.primary-menu.is-open>li.menu-item:nth-child(2){animation-delay:.11s}
  html body .site-header .topbar ul.primary-menu.is-open>li.menu-item:nth-child(3){animation-delay:.17s}
  html body .site-header .topbar ul.primary-menu.is-open>li.menu-item:nth-child(4){animation-delay:.23s}
  html body .site-header .topbar ul.primary-menu.is-open>li.menu-item:nth-child(5){animation-delay:.29s}
  html body .site-header .topbar ul.primary-menu.is-open>li.menu-item:nth-child(6){animation-delay:.35s}
}
@keyframes jhoNavIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

@media (prefers-reduced-motion:reduce){
  html body .site-header ul.primary-menu>li.menu-item,
  html body .site-header ul.primary-menu>li.menu-item>a,
  html body .site-header ul.primary-menu>li.menu-item>a::before,
  html body .site-header ul.primary-menu>li.menu-item>a::after{animation:none!important;transition:none!important}
}
/* 11-20 標頭 Logo 黃銅「-」保持原色：任何狀態都不套濾鏡（淺色標頭用深色版 Logo 檔、透明標頭用反白版檔），並告訴瀏覽器本站只有淺色版，避免手機瀏覽器的自動深色模式把 Logo 反轉成藍色 */
:root{color-scheme:only light}
html body .site-header .brand img,html body .site-header .brand .brand__logo,html body.home .site-header.is-scrolled .brand img,html body.home .site-header:not(.is-scrolled) .brand img{filter:none!important;-webkit-filter:none!important;forced-color-adjust:none}
html body.home .site-header.is-scrolled .brand__logo--primary{display:block!important}
html body.home .site-header.is-scrolled .brand__logo--reverse{display:none!important}
