/* ==========================================================================
   唐岩設計 — layout.css
   容器、header、漢堡選單、頁首大圖帶、區段、footer
   ========================================================================== */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gut);
}
.wrap--narrow { max-width: 880px; }

.section { padding: 110px 0; }
.section--alt { background: var(--bg-alt); }
.section--tight { padding: 78px 0; }

/* --- Header ------------------------------------------------------------- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              height var(--dur) var(--ease);
}

/* 首頁：起始為透明浮在滿版輪播上 */
.header--overlay {
  background: transparent;
  border-bottom-color: transparent;
}
.header--overlay .brand__zh,
.header--overlay .brand__en,
.header--overlay .nav__link,
.header--overlay .header__tel { color: #fff; }
/* 漢堡線條是用 background 畫的，設 color 沒有作用 */
.header--overlay .burger__bar { background: #fff; }
.header--overlay .brand__mark { --mark-ink: #fff; }

/* 捲動後（或 overlay 頁捲過 hero）轉實心 */
.header.is-solid {
  background: var(--bg);
  border-bottom-color: var(--line);
  box-shadow: 0 2px 20px rgba(28, 26, 23, .05);
}
.header.is-solid .brand__zh,
.header.is-solid .brand__en,
.header.is-solid .nav__link,
.header.is-solid .header__tel { color: var(--ink); }
.header.is-solid .burger__bar { background: var(--ink); }
.header.is-solid .brand__mark { --mark-ink: var(--ink); }

.header__inner {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* 品牌字標 */
.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { color: inherit; }
.brand__mark { --mark-ink: var(--ink); width: 34px; height: 34px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__zh {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: .2em;
  transition: color var(--dur) var(--ease);
}
.brand__en {
  font-family: var(--font-en);
  font-size: 9.5px;
  font-weight: 300;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color var(--dur) var(--ease);
}

/* 主選單 */
.nav { display: flex; align-items: center; gap: 40px; }
.nav__link {
  position: relative;
  font-size: 15px;
  letter-spacing: .14em;
  padding: 6px 0;
  transition: color var(--dur) var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--ease);
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav__link[aria-current="page"] { color: var(--accent); }

.header__actions { display: flex; align-items: center; gap: 22px; }
.header__tel {
  font-family: var(--font-en);
  font-size: 15px;
  letter-spacing: .1em;
  transition: color var(--dur) var(--ease);
}

/* 漢堡（行動版） */
.burger {
  display: none;
  width: 30px; height: 22px;
  position: relative;
  flex: none;
}
.burger__bar {
  position: absolute;
  left: 0;
  width: 100%; height: 1.5px;
  background: var(--ink);
  transition: transform .4s var(--ease), opacity .3s var(--ease), background var(--dur) var(--ease);
}
.burger__bar:nth-child(1) { top: 0; }
.burger__bar:nth-child(2) { top: 50%; margin-top: -.75px; }
.burger__bar:nth-child(3) { bottom: 0; }
.burger[aria-expanded="true"] .burger__bar:nth-child(1) { transform: translateY(10.25px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__bar:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__bar:nth-child(3) { transform: translateY(-10.25px) rotate(-45deg); }

/* 全螢幕行動選單 */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s var(--ease);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu__link {
  font-size: 22px;
  letter-spacing: .22em;
  padding: 14px 0;
}
.mobile-menu__link small {
  display: block;
  font-family: var(--font-en);
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 2px;
}
.mobile-menu__foot {
  margin-top: 36px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 2;
}
.mobile-menu__foot a { font-family: var(--font-en); font-size: 20px; color: var(--accent); letter-spacing: .08em; }
.mobile-menu__foot .mobile-menu__line {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-zh);
  font-size: 15px;
  letter-spacing: .16em;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
}

/* --- 內頁頁首大圖帶 ------------------------------------------------------ */

.page-hero {
  position: relative;
  min-height: 380px;
  margin-top: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--bg-alt);
}
.page-hero__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay-dk);
}
.page-hero__inner { position: relative; z-index: 1; color: #fff; padding: 60px var(--gut); }
.page-hero__en {
  font-family: var(--font-en);
  font-size: 40px;
  font-weight: 300;
  letter-spacing: .3em;
  text-transform: uppercase;
  line-height: 1.2;
}
.page-hero__zh {
  margin-top: 16px;
  font-size: 15px;
  letter-spacing: .3em;
  color: rgba(255, 255, 255, .82);
}
.page-hero__zh::before {
  content: "";
  display: block;
  width: 40px; height: 2px;
  background: var(--accent);
  margin: 0 auto 16px;
}

/* 麵包屑 */
.crumbs {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: .1em;
}
.crumbs ol { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 0; }
.crumbs li::after { content: "／"; margin-left: 10px; color: var(--line); }
.crumbs li:last-child::after { content: none; }
.crumbs [aria-current="page"] { color: var(--ink); }

/* --- Footer -------------------------------------------------------------- */

.footer {
  background: var(--ink);
  color: rgba(250, 248, 245, .72);
  font-size: 14px;
  line-height: 2;
}
.footer a { color: rgba(250, 248, 245, .72); }
.footer a:hover { color: #fff; }

.footer__top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.4fr;
  gap: 56px;
  padding: 74px 0 56px;
}
.footer .brand__zh { color: #fff; }
.footer .brand__en { color: rgba(250, 248, 245, .5); }
.footer .brand__mark { --mark-ink: #fff; }

.footer__tagline { margin-top: 20px; max-width: 300px; font-size: 13.5px; line-height: 2.1; }

.footer__title {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(250, 248, 245, .62);
  margin-bottom: 18px;
}
.footer__list li { margin-bottom: 6px; }

.footer__dl { display: grid; grid-template-columns: 76px 1fr; gap: 4px 12px; font-size: 13.5px; }
.footer__dl dt { color: rgba(250, 248, 245, .62); }
.footer__dl dd { margin: 0; }
.footer__dl a[href^="tel:"] { font-family: var(--font-en); letter-spacing: .06em; }

.footer__bottom {
  border-top: 1px solid rgba(250, 248, 245, .12);
  padding: 22px 0 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: rgba(250, 248, 245, .62);
}

/* --- 網格 ---------------------------------------------------------------- */

.grid { display: grid; gap: 30px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

/* --- RWD ---------------------------------------------------------------- */

@media (max-width: 1024px) {
  .section { padding: 84px 0; }
  .nav, .header__tel { display: none; }
  .burger { display: block; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .page-hero__en { font-size: 32px; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .section--tight { padding: 52px 0; }
  .grid { gap: 22px; }
  .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; }
  .page-hero { min-height: 280px; }
  .page-hero__en { font-size: 26px; letter-spacing: .24em; }
  .page-hero__zh { font-size: 13px; }
  .footer__top { grid-template-columns: 1fr; gap: 34px; padding: 52px 0 40px; }
  .brand__zh { font-size: 16px; }
  .brand__mark { width: 30px; height: 30px; }
}
