/* HAILI 官方網站樣式
   三個斷點：手機 <810px、平板 810–1199px、桌機 ≥1200px
   數值取自舊站實測，改動前請先量過再改 */

:root {
  --ink: #1c1b17;          /* 標題與導覽 */
  --body: #333333;         /* 內文 */
  --cream: #f6f5f4;        /* 深色底上的文字 */
  --hairline: #cccccc;     /* 卡片外框 */
  --btn-line: #999999;     /* 按鈕外框 */
  --serif: "Montaga", "Times New Roman", serif;
  --cjk: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --jost: "Jost", var(--cjk);
  --outfit: "Outfit", var(--cjk);
}

html[lang="ja"] { --cjk: "Noto Sans JP", "Hiragino Sans", sans-serif; }
html[lang="ko"] { --cjk: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif; }
html[lang="en"] { --cjk: sans-serif; }

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--body);
  font-family: var(--jost);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
a { color: inherit; }

.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;
}

/* 字體工具類別：段落與行內文字都可能各自指定 */
.f-jost { font-family: var(--jost); }
.f-outfit { font-family: var(--outfit); }
.f-cjk { font-family: var(--cjk); }
.f-serif { font-family: var(--serif); }
.w4 { font-weight: 400; }
.w5 { font-weight: 500; }
.w6 { font-weight: 600; }
.w7 { font-weight: 700; }

/* ---------- 版面容器 ---------- */

.wrap { width: 1040px; margin: 0 auto; }
.wrap--wide { width: 1200px; margin: 0 auto; }

/* ---------- 頁首 ---------- */

.masthead {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.masthead__inner {
  display: flex;
  align-items: center;
  height: 100%;
}

.brand {
  display: block;
  width: 193px;
  height: 60px;
  margin-right: 186px;
  color: var(--ink);
  flex: none;
}
.brand svg { width: 100%; height: 100%; display: block; }

.mainnav { display: flex; gap: 32px; }
.mainnav a {
  font-family: var(--jost);
  font-size: 16px;
  line-height: 16px;
  color: var(--ink);
  text-decoration: none;
}
.mainnav a:hover { opacity: 0.6; }

.langpick { position: relative; margin-left: auto; display: flex; align-items: center; }
.langpick__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--body);
  font-family: var(--jost);
  font-size: 13px;
  line-height: 25px;
}
.langpick__btn svg { width: 13px; height: 20px; flex: none; }
.langpick__menu {
  position: absolute;
  top: calc(100% + 11px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  padding: 10px 25px;
  display: none;
  flex-direction: column;
  gap: 5px;
  background: #fff;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.1) 6px 10px 20px 2px;
  z-index: 10;
}
.langpick[data-open="true"] .langpick__menu { display: flex; }
.langpick__menu a {
  font-family: var(--jost);
  font-size: 13px;
  line-height: 25px;
  color: var(--body);
  text-decoration: none;
  text-align: center;
}
.langpick__menu a:hover { color: var(--ink); }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 32px;
  box-shadow: inset 0 0 0 1px var(--btn-line);
  border: 0;
  border-radius: 500px;
  color: var(--ink);
  font-family: var(--jost);
  font-size: 16px;
  line-height: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.pill:hover { background: var(--ink); color: var(--cream); box-shadow: inset 0 0 0 1px var(--ink); }

.masthead .pill { margin-left: 10px; flex: none; }

/* ---------- 共用標題 ---------- */

.section-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 54px;
  line-height: 64px;
  color: var(--ink);
}

section { scroll-margin-top: 100px; }

/* 頁首是 fixed，主內容往下讓開它的高度 */
main { padding-top: 100px; }

/* ---------- 相片輪播 ---------- */

.gallery {
  position: relative;
  overflow: hidden;
  background: #f2f2f2;
  aspect-ratio: 16 / 9;
}
.gallery__track {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.1, 1);
}
.gallery__track.is-instant { transition: none; }
.gallery__slide { flex: 0 0 100%; height: 100%; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }

.gallery__arrow {
  position: absolute;
  top: 50%;
  margin-top: -20px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #fff;
  cursor: pointer;
}
.gallery__arrow svg { width: 100%; height: 100%; }
.gallery__arrow--prev { left: 20px; }
.gallery__arrow--next { right: 20px; }

.gallery__dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
  height: 25px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 50px;
}
.gallery__dot {
  width: 5px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  opacity: 0.45;
  cursor: pointer;
  transition: opacity 0.3s ease;
}
.gallery__dot[aria-current="true"] { opacity: 1; }

/* ---------- 全幅底圖區塊 ---------- */

.coverart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.philosophy .coverart { object-position: 0% 50%; }
.siteinfo .coverart { object-position: 50% 100%; }

.philosophy, .menu, .siteinfo { position: relative; }
.philosophy .wrap, .menu .wrap, .siteinfo .wrap--wide { position: relative; z-index: 1; }

/* ---------- PHILOSOPHY ---------- */

.philosophy { padding: 150px 0 300px; color: var(--cream); }
.philosophy .section-title { color: var(--cream); }
.philosophy__body {
  width: 350px;
  margin: 32px 0 0;
  font-size: 16px;
  line-height: 25px;
  letter-spacing: 0.05em;
  font-weight: 500;
  white-space: pre-wrap;
}
html[lang="zh-Hant"] .philosophy__body { letter-spacing: 0.1em; }

/* ---------- ABOUT + CHEF ---------- */

.about { padding: 120px 0; }
.about__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 34px;
}
.card { box-shadow: inset 0 0 0 1px var(--hairline); padding: 40px 32px; }
.card h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 32px;
  color: var(--ink);
}
.card p {
  margin: 32px 0 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  white-space: pre-wrap;
}

.chef { margin-top: 100px; }
.chef__body {
  width: 90%;
  margin: 50px 0 0;
  font-size: 18px;
  line-height: 30px;
  letter-spacing: 0.1em;
  font-weight: 500;
  white-space: pre-wrap;
}
html[lang="en"] .chef__body { letter-spacing: normal; }

/* ---------- MENU ---------- */

.menu { padding: 100px 0; color: var(--cream); }
.menu .section-title { color: var(--cream); }
.menu__body {
  width: var(--menu-width, 520px);
  margin: 32px 0 0;
  font-size: 16px;
  /* 26.5px 不是筆誤。舊站這段的段落基準字級是 12px、行內文字 16px，
     兩個行框疊起來實際行距落在 26–27px 之間（中文行偏 26、英文行偏 27）。
     取中間值才不會讓整份價目表整體長高或縮短。 */
  line-height: 26.5px;
  white-space: pre-wrap;
}

/* ---------- RESERVATION ---------- */

.booking { padding: 150px 0; }
.booking .wrap { position: relative; min-height: 600px; }
.booking__body {
  width: 520px;
  margin: 30px 0 0;
  font-size: 16px;
  line-height: 1.5em;
  letter-spacing: 0.05em;
  font-weight: 500;
  color: #000;
  white-space: pre-wrap;
}
.booking .section-title { color: #000; }
.booking .pill { margin-top: 32px; }
.booking__figure {
  position: absolute;
  top: 0;
  left: 641px;
  width: 409px;
  height: 600px;
}
.booking__figure img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 頁尾資訊 ---------- */

.siteinfo { padding: 100px 0 50px; color: #fff; }
.siteinfo__logo { display: block; width: 193px; height: 60px; color: #fff; }
.siteinfo__logo svg { width: 100%; height: 100%; display: block; }
.siteinfo__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 20px;
}
.infogroup + .infogroup { margin-top: 25px; }
.siteinfo p {
  margin: 0;
  font-size: 15px;
  line-height: 25px;
  letter-spacing: 0.05em;
  white-space: pre-wrap;
}
.siteinfo p.is-note { font-size: 13px; line-height: 15px; }
html[lang="zh-Hant"] .siteinfo p.is-note { line-height: 25px; }
.siteinfo a { text-decoration: none; }
.siteinfo a:hover { text-decoration: underline; }
.siteinfo__rule { height: 1px; margin-top: 20px; background: #fff; border: 0; }
.siteinfo p.siteinfo__copy {
  margin: 20px 0 0;
  text-align: right;
  font-family: var(--jost);
  font-size: 14px;
  line-height: 20px;
}
/* 頁尾在原站是全大寫呈現 */
.siteinfo p { text-transform: uppercase; }

/* ---------- 平板 810–1199px ---------- */

@media (max-width: 1199.98px) {
  .wrap { width: auto; margin: 0 50px; }
  .wrap--wide { width: auto; margin: 0 40px; }

  .masthead__inner { padding: 0 40px; }
  .brand { margin-right: 0; }
  .mainnav { display: none; }
  .masthead .pill { margin-left: 24px; }

  .section-title { font-size: 48px; line-height: 54px; }

  .philosophy { padding: 150px 0 250px; }
  .philosophy__body { width: 50%; font-size: 17px; }

  .about { padding: 100px 0; }
  .about__cards { gap: 16px; margin-top: 26px; }
  .card { padding: 40px 24px; }
  .chef { margin-top: 92px; }
  .chef__body { font-size: 16px; line-height: 25px; }

  .menu { padding: 100px 0 150px; }

  .booking { padding: 100px 0; }
  .booking .section-title { font-size: 40px; }
  .booking__body { width: 50%; line-height: 25px; }
  .booking .wrap { min-height: 440px; }
  .booking__figure { left: 619px; width: 300px; height: 440px; }

  .siteinfo { padding: 90px 0 50px; }
}

/* ---------- 手機 <810px ---------- */

@media (max-width: 809.98px) {
  .wrap { margin: 0 30px; }
  .wrap--wide { margin: 0 20px; }

  .masthead__inner { display: block; position: relative; padding: 0; }
  .brand {
    position: absolute;
    left: 10px; top: 15px;
    width: 130px; height: 40px;
    margin: 0;
  }
  .langpick { position: absolute; right: 10px; top: 22px; margin: 0; }
  .langpick__menu { left: auto; right: 0; transform: none; }
  .masthead .pill {
    position: absolute;
    left: 10px; right: 10px; top: 65px;
    height: 25px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.8);
    color: var(--cream);
    font-size: 13px;
    line-height: 25px;
  }
  .masthead .pill:hover { background: #000; }

  .gallery { aspect-ratio: 125 / 96; }
  .gallery__arrow { width: 30px; height: 30px; margin-top: -15px; }
  .gallery__dots { bottom: 8px; }

  .section-title { font-size: 35px; line-height: 54px; }

  .philosophy { min-height: 847px; padding: 50px 0 80px; }
  .philosophy__body { width: 100%; margin-top: 18px; }

  .about { padding: 80px 0; }
  .about__cards { grid-template-columns: 1fr; gap: 24px; margin-top: 26px; }
  .card { padding: 40px 24px; }
  .chef { margin-top: 80px; }
  .chef__body { width: 100%; margin-top: 25px; font-size: 16px; line-height: 25px; }

  .menu { min-height: 1323px; padding: 50px 0 80px; }
  /* 手機版的菜單照片要靠下裁切，否則盤子會蓋到下半段文字 */
  .menu .coverart { object-position: 50% 100%; }
  /* 手機版的菜單：中日韓字縮成 15px，英數字仍維持 16px，跟舊站一致 */
  .menu__body { width: 100%; font-size: 15px; line-height: 26px; }
  .menu__body .f-outfit, .menu__body .f-jost { font-size: 16px; }

  .booking { padding: 80px 0; }
  .booking .wrap { min-height: 0; }
  .booking .section-title { font-size: 35px; }
  .booking__body { width: 100%; margin-top: 25px; }
  .booking .pill { margin-top: 25px; }
  .booking__figure {
    position: static;
    width: 100%;
    height: auto;
    aspect-ratio: 315 / 180;
    margin-top: 50px;
  }

  .siteinfo { min-height: 894px; padding: 100px 0 50px; }
  .siteinfo__cols { grid-template-columns: 1fr; gap: 25px; }
  .siteinfo p { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery__track { transition: none; }
}
