/* NOBUO 首頁樣式
   所有數值都是對現站實測後照抄的，不是憑感覺調的；對照表見 ../../MEASURE.md。
   斷點：桌機 ≥1200 / 平板 810–1199 / 手機 ≤809。 */

:root {
  --white: #fff;
  --muted: rgb(115, 115, 115);
  --dark: rgb(44, 48, 43);
  /* 現站所有轉場共用的曲線 */
  --ease: cubic-bezier(.44, 0, .56, 1);
  --sans: "Switzer Variable", "Switzer", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --sans-static: "Switzer", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --cjk: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

/* 換頁時讓瀏覽器把前一頁的畫面留著、淡入下一頁，
   不會出現「先畫底色再載圖」的那一下黑。
   不支援的瀏覽器就是一般的換頁，不會壞掉。 */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: .28s; animation-timing-function: cubic-bezier(.44, 0, .56, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--dark);
  color: var(--white);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* 給螢幕閱讀器與搜尋引擎的標題，視覺上不出現 */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── 導覽列 ─────────────────────────────────────────── */

.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 20; }

.nav { padding: 15px 25px 0; }

/* 現站的導覽列是淡入進場（0.6s），手機版沒有這段動效 */
/* 起始值寫在 keyframes 裡而不是元素上：萬一動畫沒跑（舊瀏覽器、擷圖工具），
   導覽列仍然是看得見的，不會整條消失 */
@media (min-width: 810px) {
  .nav { animation: nav-in .6s var(--ease) both; }
}
@keyframes nav-in { from { opacity: .001; } to { opacity: 1; } }

.nav__row { display: flex; align-items: center; justify-content: space-between; }

/* 左右兩塊等寬撐開，導覽連結因此落在正中間偏左的固定位置（跟現站一致） */
.nav__logo { flex: 1 1 0; display: flex; align-items: center; color: var(--white); }
.nav__wordmark { display: block; width: 109px; height: 28px; }

.nav__links { display: flex; gap: 40px; }
.nav__links, .nav__links a { font-size: 14px; line-height: 21px; letter-spacing: -.14px; }

.nav__side { flex: 1 1 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

.btn {
  display: flex; align-items: center; justify-content: center;
  height: 31px; padding: 5px 15px;
  background: var(--white); color: #000;
  font-size: 13px; line-height: 19.5px;
}

/* ── 語言切換 ───────────────────────────────────────── */
/* 真正的 <select> 疊在上面但透明，鍵盤與行動裝置都能用原生選單 */

.lang { position: relative; display: inline-flex; align-items: center; }

/* 收起來的樣子：文字固定 83px + 箭頭，跟原本一致 */
.lang__face {
  display: inline-flex; align-items: center; gap: 5px; padding: 0 5px;
  font-family: var(--sans-static); font-size: 15px; line-height: 22.5px;
  cursor: pointer; list-style: none; user-select: none;
}
.lang__face::-webkit-details-marker { display: none; }
.lang__face::marker { content: ""; }
.lang__text { display: block; width: 83px; }
.lang__chev { width: 12px; height: 12px; transition: transform .25s var(--ease); }
.lang[open] .lang__chev { transform: rotate(180deg); }

/* 展開的面板 */
.lang__menu {
  position: absolute; z-index: 40; top: calc(100% + 10px); right: 0;
  min-width: 100%;
  /* 面板本身不留上下內距：留了的話，滑到第一個或最後一個項目時，
     反白色塊上下會各露出一條深色邊 */
  background: var(--dark); color: var(--white);
  animation: lang-in .18s var(--ease) both;
}
@keyframes lang-in { from { opacity: 0; transform: translateY(-4px); } }

.lang__opt {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 10px 14px; white-space: nowrap;
  font-family: var(--sans-static); font-size: 15px; line-height: 22.5px;
  transition: background-color .2s var(--ease);
}
.lang__opt:hover, .lang__opt:focus-visible { background: rgba(255, 255, 255, .12); }
/* 目前語言後面加一個勾 */
.lang__opt.is-current::after {
  content: ""; width: 10px; height: 6px; flex: 0 0 auto;
  border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg) translate(1px, -2px);
}
.lang__opt:not(.is-current)::after { content: ""; width: 10px; flex: 0 0 auto; }

/* 頁尾那顆貼在頁面最底，往上開才不會被切掉 */
.lang--foot .lang__menu { top: auto; bottom: calc(100% + 10px); }
/* 手機展開選單裡的那顆：抽屜本身有 overflow: hidden（開合動畫要用），
   浮動面板會被切掉，所以改成順著版面往下長，抽屜跟著變高 */
.lang--drawer { display: flex; flex-direction: column; align-items: flex-start; }
.lang--drawer .lang__menu {
  position: static; min-width: 0; padding: 4px 0 0;
  background: none; animation: none;
}
.lang--drawer .lang__opt { padding: 7px 0; font-size: 14px; line-height: 21px; }
.lang--drawer .lang__opt:hover, .lang--drawer .lang__opt:focus-visible { background: none; opacity: .7; }

/* ── 漢堡鈕（只有手機出現）───────────────────────────── */

.burger {
  display: none; width: 30px; height: 28px;
  flex-direction: column; justify-content: center; gap: 8px;
}
.burger span { display: block; height: 2px; width: 100%; background: var(--white); transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav.is-open .burger span:first-child { transform: translateY(5px) rotate(45deg); }
.nav.is-open .burger span:last-child { transform: translateY(-5px) rotate(-45deg); }

/* ── 手機展開選單 ───────────────────────────────────── */

.nav__drawer { display: none; }
.nav__drawerlinks { display: flex; flex-direction: column; gap: 15px; }
.nav__drawerlinks, .nav__drawerlinks a { font-size: 14px; line-height: 21px; letter-spacing: -.14px; }

/* ── 相片輪播 ───────────────────────────────────────── */

.hero { position: relative; height: 100vh; overflow: hidden; background: #000; }
.hero__track { display: flex; height: 100%; will-change: transform; }
.hero__slide { flex: 0 0 100%; height: 100%; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* 第一張的構圖要對齊底部，跟現站相同 */
.hero__slide img.is-bottom { object-position: center bottom; }

.hero__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 40px;
  display: grid; place-items: center;
}
.hero__arrow--prev { left: 20px; }
.hero__arrow--next { right: 20px; }

.hero__dots {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 5px;
  display: flex;
}
.hero__dot { padding: 10px 5px; display: flex; align-items: center; }
.hero__dot:first-child { padding-left: 10px; }
.hero__dot:last-child { padding-right: 10px; }
.hero__dot i {
  display: block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--white); opacity: .5; transition: opacity .3s var(--ease);
}
.hero__dot[aria-selected="true"] i { opacity: 1; }

/* ── 頁尾 ───────────────────────────────────────────── */

.foot { background: var(--dark); }
.foot__inner { padding: 50px 25px 10px; display: flex; flex-direction: column; }
.foot__mark { display: block; width: 201px; height: 80px; color: var(--white); }

.foot__contact { padding: 25px 0 60px; display: flex; flex-direction: column; gap: 20px; }
.foot__block { display: flex; flex-direction: column; gap: 6px; }
.foot__label, .foot__value, .foot__legal,
.foot__pages, .foot__socials, .foot__pages a, .foot__socials a {
  font-size: 14px; line-height: 21px; letter-spacing: -.14px;
}
.foot__label { color: var(--muted); }
.foot__label--cjk { font-family: var(--cjk); }
.foot__legal { color: var(--muted); }

.foot__bottom { display: flex; gap: 10px; align-items: flex-end; padding-bottom: 20px; }
.foot__navs { display: flex; gap: 40px; align-items: flex-end; }
.foot__pages, .foot__socials { display: flex; flex-direction: column; gap: 10px; }
.foot__copy { flex: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
/* 頁尾這顆右邊沒有留白，導覽列那顆有 —— 現站就是這樣 */
.lang--foot .lang__face { font-size: 14px; line-height: 21px; padding-right: 0; }
.lang--foot .lang__opt { font-size: 14px; line-height: 21px; }
.foot__legal { align-self: stretch; text-align: right; }

/* ── 平板 810–1199 ─────────────────────────────────── */

@media (max-width: 1199px) {
  .hero { height: 70vh; }
}

/* ── 手機 ≤809 ─────────────────────────────────────── */

@media (max-width: 809px) {
  .nav { padding: 15px 20px; transition: background-color .4s var(--ease); }
  .nav.is-open { background: var(--dark); }
  .nav__links { display: none; }
  .lang--nav { display: none; }
  .burger { display: flex; }
  .nav__side { gap: 20px; }
  .btn { height: 30px; padding: 5px 10px; }

  .nav__drawer {
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows .4s var(--ease);
  }
  .nav__drawer > * { overflow: hidden; }
  .nav.is-open .nav__drawer { grid-template-rows: 1fr; }
  /* 收合時用 visibility 讓連結退出 tab 順序，展開時立刻可用 */
  /* 內距要放在裡面的元素上：放在 drawerinner 上的話，收合時
     高度雖然被 overflow 夾成 0，padding 還是會留下 24px 的空殼 */
  .nav__drawerinner {
    display: flex; flex-direction: column; gap: 24px;
    visibility: hidden; transition: visibility 0s linear .4s;
  }
  .nav__drawerlinks { padding-top: 24px; }
  .nav.is-open .nav__drawerinner { visibility: visible; transition-delay: 0s; }

  .hero { height: 50vh; }

  .foot__inner { padding: 50px 20px 10px; }
  .foot__contact { padding: 40px 0 60px; }
  .foot__bottom { flex-direction: column; align-items: stretch; gap: 25px; }
  .foot__copy { align-items: flex-start; gap: 20px; }
  /* 手機版的版權那行是置中的（現站如此），語言選擇仍靠左 */
  .foot__legal { align-self: stretch; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .nav { opacity: 1; animation: none; }
  .hero__track { transition: none !important; }
}

/* ══ 內頁 ═════════════════════════════════════════════════
   以下數值同樣是對現站實測後照抄，對照表見 ref/measure/*.md */

:root {
  --serif: "Gilda Display", Georgia, "Times New Roman", serif;
  /* 捲動進場的曲線：直接把現站量到的取樣點編碼進去，不做近似 */
  --reveal: linear(0, 0.1 9.5%, 0.39 18.9%, 0.61 28.4%, 0.76 37.8%, 0.87 47.2%,
                   0.93 56.5%, 0.96 66.4%, 0.98 75.8%, 0.99 85%, 1);
}

/* ── 內頁大圖 ───────────────────────────────────────── */

.phero { position: relative; height: 800px; display: grid; place-items: center; overflow: hidden; background: #000; }
.phero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phero__dim { position: absolute; inset: 0; background: #000; opacity: .3; }
.phero__title {
  position: relative; margin: 0;
  font-family: var(--serif); font-weight: 400;
  font-size: 46px; line-height: 55.2px; letter-spacing: -.92px; color: var(--white);
}

/* ── 內容區共用 ─────────────────────────────────────── */

.section { background: var(--white); color: #000; padding: 125px 0 150px; }
.section--menu { padding-top: 100px; }
.section__inner { margin: 0 auto; }
.section__inner--narrow { width: min(590px, 84.3%); }
.section__inner--prose { width: min(750px, 84.8%); }
.section__inner--people { width: min(756px, 76%); }

/* ── about：標題＋內文成對 ──────────────────────────── */

.pair + .pair { margin-top: 50px; }
.pair__heading { margin: 0 0 25px; font-weight: 400; color: #000; }
.pair__heading--cjk { font-family: var(--cjk); font-size: 26px; line-height: 33.8px; letter-spacing: -1.04px; }
.pair__heading--latin { font-family: var(--sans); font-size: 26px; line-height: 39px; letter-spacing: -.26px; }
/* 區塊之間 24px，同一區塊裡的段落之間 20px —— 兩個數字都量自現站 */
.pair__body { display: flex; flex-direction: column; gap: 24px; }
.pair__block { display: flex; flex-direction: column; gap: 20px; }
.pair__text { font-family: var(--sans-static); font-size: 14px; line-height: 22.4px; color: var(--muted); }
.pair__text--latin { font-family: var(--sans); line-height: 21px; letter-spacing: -.14px; }

/* ── concept：整段文章 ─────────────────────────────── */

.prose { display: flex; flex-direction: column; gap: 32px; }
.prose__p {
  font-family: var(--sans-static); font-size: 16px; line-height: 32px;
  letter-spacing: .16px; color: var(--muted); text-align: justify;
}

/* ── menu：品項與價格 ──────────────────────────────── */

.menugroup { display: flex; flex-direction: column; gap: 25px; }
.menugroup + .menugroup, .memo { margin-top: 60px; }
/* 沒有說明文字的品項，下方仍留 5px —— 現站的卡片高度是 27（22+5） */
.item--bare { padding-bottom: 5px; }
.item__row {
  display: flex; justify-content: space-between;
  font-family: var(--sans-static); font-size: 16px; line-height: 22.4px;
  letter-spacing: -.16px; color: #000;
}
.item__name, .item__price { flex: 0 0 50%; }
.item__price { text-align: right; }
.item__note {
  margin-top: 5px;
  font-family: var(--sans); font-size: 14px; line-height: 21px;
  letter-spacing: -.14px; color: var(--muted);
}
.memo { display: flex; flex-direction: column; gap: 25px; }
.memo__line { font-family: var(--sans-static); font-size: 14px; line-height: 22.4px; color: var(--muted); }
.memo__line--strong { font-family: var(--sans-static); font-size: 15px; line-height: 22.5px; letter-spacing: -.15px; color: #000; }

/* ── team：成員 ────────────────────────────────────── */

.person + .person { margin-top: 100px; }
.person__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.person__name {
  margin-top: 30px;
  font-family: var(--sans-static); font-size: 20px; line-height: 30px;
  letter-spacing: -.2px; color: rgb(38, 38, 38);
}
.person__p {
  margin-top: 20px;
  font-family: var(--sans-static); font-size: 14px; line-height: 22.4px; color: var(--muted);
}
.person__name + .person__p { margin-top: 30px; }

/* ── 捲動進場 ──────────────────────────────────────── */

.reveal { opacity: .001; transform: translateY(10px); }
.reveal.is-in {
  opacity: 1; transform: none;
  /* 第一行是給不支援 linear() 的瀏覽器的退路，第二行才是照抄現站的曲線 */
  transition: opacity 1300ms cubic-bezier(.16, .84, .38, 1), transform 1300ms cubic-bezier(.16, .84, .38, 1);
  transition: opacity 1300ms var(--reveal), transform 1300ms var(--reveal);
}

/* ── 平板 ──────────────────────────────────────────── */

@media (max-width: 1199px) {
  .prose__p { font-size: 15px; line-height: 30px; }
  .prose { gap: 30px; }
}

/* 平板的上下留白與桌機不同，而且每個頁型都不一樣 —— 現站就是這樣，照抄 */
@media (min-width: 810px) and (max-width: 1199px) {
  .section { padding: 125px 0 100px; }
  .section--prose { padding-top: 100px; }
  .section--menu { padding: 100px 0 120px; }
  /* 平板的文章段落左右各縮 5%，桌機與手機沒有 */
  .prose { padding: 0 5%; }
}

/* ── 手機 ──────────────────────────────────────────── */

@media (max-width: 809px) {
  .phero { height: 400px; }
  .phero__title { font-size: 36px; line-height: 43.2px; letter-spacing: -.72px; }

  .section { padding: 100px 0; }
  .section--menu { padding: 80px 0 100px; }
  .section--prose, .section--people { padding-bottom: 125px; }

  .prose__p { font-size: 14px; line-height: 28px; }
  .prose { gap: 28px; }

  .person__img { aspect-ratio: 268 / 239; }
  /* 手機版備註區上下各留 10px */
  .memo { padding: 10px 0; }
  .section__inner--people { width: 71.5%; }
  /* 手機版照片到姓名、姓名到首段都是 20px（桌機是 30px） */
  .person__name, .person__name + .person__p { margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ── 找不到頁面 ────────────────────────────────────── */

.notfound { min-height: 100vh; display: grid; place-items: center; padding: 40px 25px; background: var(--dark); }
.notfound__inner { display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.notfound .foot__mark { width: 201px; height: 80px; color: var(--white); }
.notfound__title { font-family: var(--cjk); font-size: 20px; line-height: 30px; letter-spacing: -.2px; }
.notfound__sub { font-family: var(--sans); font-size: 14px; line-height: 21px; letter-spacing: -.14px; color: var(--muted); }
.notfound__links { font-family: var(--sans); font-size: 14px; line-height: 21px; letter-spacing: -.14px; }
.notfound__links a { border-bottom: 1px solid rgba(255, 255, 255, .4); padding-bottom: 2px; }
