/* ============================================================
   site-chrome.css — 全站统一 页头 / 页脚 / 隐私弹窗 样式（唯一来源）
   ------------------------------------------------------------
   加载方式：每个页面的 <head> 中，在本地样式表【之前】加载本文件
   （本地样式表仍可覆盖，服务页/首页的个性化 header 细节得以保留）。

   注意：styles.css / shanghai.css / tea-culture.css / standard-routes.css /
   custom-tour.css 中遗留的同名规则已不再维护，后续只改本文件。
   页面 markup 统一由 components/header-main.html 与
   components/footer-main.html（含隐私弹窗）经 tools/stamp.mjs 打标生成。
   ============================================================ */

/* ================= Header（统一） ================= */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  min-height: 84px;
  display: grid;
  grid-template-columns: minmax(180px, 320px) 1fr minmax(170px, 320px);
  align-items: center;
  gap: 32px;
  padding: 20px clamp(22px, 5vw, 68px);
  background: linear-gradient(180deg, rgba(7, 22, 18, 0.78), rgba(7, 22, 18, 0.12));
  border-bottom: 1px solid rgba(255, 248, 237, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: "Inter", sans-serif;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-emblem {
  width: clamp(36px, 3.2vw, 54px);
  height: clamp(36px, 3.2vw, 54px);
  object-fit: contain;
}

.brand-wordmark {
  width: clamp(128px, 11vw, 190px);
  min-width: 0;
}

/* The fan and horizontal wordmark have independent, uncropped proportions. */
.site-header .brand .brand-emblem,
.ttc-global-header .ttc-global-brand img:first-child {
  width: 66px;
  height: auto;
  flex: 0 0 66px;
  object-fit: contain;
}

.site-header .brand .brand-wordmark,
.ttc-global-header .ttc-global-brand img:last-child {
  width: 210px;
  height: auto;
  min-width: 0;
  flex: 0 1 210px;
  object-fit: contain;
}

@media (max-width: 760px) {
  .site-header .brand .brand-emblem,
  .ttc-global-header .ttc-global-brand img:first-child {
    width: 42px;
    flex-basis: 42px;
  }

  .site-header .brand .brand-wordmark,
  .ttc-global-header .ttc-global-brand img:last-child {
    width: 120px;
    flex-basis: 120px;
  }
}

@media (max-width: 360px) {
  .site-header .brand,
  .ttc-global-header .ttc-global-brand {
    gap: 6px;
  }

  .site-header .brand .brand-emblem,
  .ttc-global-header .ttc-global-brand img:first-child {
    width: 34px;
    flex-basis: 34px;
  }

  .site-header .brand .brand-wordmark,
  .ttc-global-header .ttc-global-brand img:last-child {
    width: 104px;
    flex-basis: 104px;
  }
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(30px, 4.4vw, 68px);
  color: rgba(255, 248, 237, 0.76);
  font-size: 16px;
  font-weight: 800;
}

.nav-links a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease;
}

@media (min-width: 761px) and (max-width: 1399px) {
  .site-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 24px;
  }

  .site-header .nav-links {
    gap: 24px;
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .site-header.ttc-fixed-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 14px 24px;
    padding: 16px 28px;
  }

  .site-header .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .site-header .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    gap: 32px;
    font-size: 14px;
  }

  .site-header > .ttc-nav-actions {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  .site-header .nav-cta {
    white-space: nowrap;
  }
}

.nav-cta {
  padding: 12px 22px;
  color: rgba(255, 248, 237, 0.92);
  border: 1px solid rgba(255, 248, 237, 0.32);
  border-radius: 999px;
  background: rgba(255, 248, 237, 0.06);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 180ms ease,
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
  touch-action: manipulation;
}

.ttc-nav-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 9px;
}

.ttc-nav-whatsapp {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  color: #e8c97d;
  border: 1px solid rgba(232, 201, 125, 0.72);
  border-radius: 50%;
  background: rgba(232, 201, 125, 0.075);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 237, 0.025);
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.ttc-nav-whatsapp svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.ttc-nav-whatsapp:focus-visible {
  outline: 2px solid #e1be6c;
  outline-offset: 3px;
}

/* 目的地页：保持原 shanghai 模板的 sticky 深色条 */
.shanghai-page .site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  color: #fff8ed;
  background: rgba(7, 22, 18, 0.96);
  border-bottom-color: rgba(214, 173, 104, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover,
  .nav-cta:hover {
    color: #fff8ed;
  }

  .nav-cta:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 248, 237, 0.52);
    background: rgba(255, 248, 237, 0.12);
  }
}

@media (hover: none) {
  .nav-cta:active {
    transform: scale(0.97);
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 102px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 40px auto;
    align-items: center;
    gap: 10px 14px;
    padding: 14px clamp(14px, 4.6vw, 20px) 12px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    min-width: 0;
    gap: 9px;
    height: 40px;
  }

  .brand-emblem {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
  }

  .brand-wordmark {
    width: clamp(102px, 30vw, 122px);
  }

  .nav-links {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    gap: clamp(12px, 4vw, 22px);
    font-size: 12px;
  }

  .nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    justify-self: end;
    grid-column: 2;
    grid-row: 1;
    white-space: nowrap;
    height: 34px;
    padding: 8px clamp(10px, 3vw, 14px);
    font-size: clamp(10px, 2.6vw, 12px);
    line-height: 1;
  }

  .ttc-nav-actions {
    grid-column: 2;
    grid-row: 1;
    gap: 6px;
  }

  .ttc-nav-whatsapp {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .ttc-nav-whatsapp svg {
    width: 17px;
    height: 17px;
  }
}

@media (max-width: 600px) {
  .ttc-nav-actions { gap: 5px; }

  .site-header .ttc-nav-whatsapp {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .site-header .ttc-nav-actions .nav-cta {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 8.5px;
  }
}

/* ================= Footer（统一） ================= */

.site-footer {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 7vw, 104px) clamp(24px, 6vw, 92px) 28px;
  color: rgba(255, 248, 237, 0.72);
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at 12% 12%, rgba(185, 139, 66, 0.16), transparent 32%),
    radial-gradient(circle at 88% 72%, rgba(71, 119, 104, 0.18), transparent 34%),
    linear-gradient(145deg, #183a32 0%, #071612 58%, #10231f 100%);
  border-top: 1px solid rgba(218, 177, 101, 0.28);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 248, 237, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 248, 237, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, transparent, #000 28%, #000 72%, transparent);
}

.footer-main,
.footer-bottom {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(300px, 1.5fr) minmax(112px, 0.5fr) minmax(112px, 0.5fr) minmax(175px, 0.65fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
  padding-bottom: clamp(58px, 6vw, 84px);
}

.footer-identity {
  max-width: 460px;
}

.footer-brand {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.footer-brand img:first-child {
  width: 52px;
  height: 48px;
  object-fit: contain;
}

.footer-brand img:last-child {
  width: 192px;
  height: auto;
  object-fit: contain;
}

.site-footer .footer-brand {
  max-width: 100%;
}

.site-footer .footer-brand img:first-child {
  width: 64px;
  height: auto;
  flex: 0 0 64px;
}

.site-footer .footer-brand img:last-child {
  width: 210px;
  min-width: 0;
  height: auto;
  flex: 0 1 210px;
}

@media (max-width: 760px) {
  .site-footer .footer-brand img:first-child {
    width: 48px;
    flex-basis: 48px;
  }

  .site-footer .footer-brand img:last-child {
    width: 182px;
    flex-basis: 182px;
  }
}

.footer-tagline {
  max-width: 410px;
  margin: 26px 0 0;
  color: rgba(255, 248, 237, 0.72);
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 600;
  line-height: 1.55;
}

/* 身份栏联系方式（Contact us 标注 + WhatsApp / Email） */
.footer-contact-label {
  margin: 26px 0 8px;
  color: #d6ad68;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-navigation,
.footer-follow,
.footer-policies,
.footer-contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-contact-links {
  margin-top: 12px;
}

.footer-navigation > p,
.footer-follow > p,
.footer-policies > p {
  margin: 0 0 8px;
  color: #d6ad68;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-navigation a,
.footer-feedback-link {
  color: rgba(255, 248, 237, 0.72);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease;
}

.footer-navigation a:hover,
.footer-feedback-link:hover,
.footer-navigation a:focus-visible,
.footer-feedback-link:focus-visible {
  color: #fff8ed;
}

.footer-feedback-link {
  max-width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

.footer-privacy-trigger {
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

.footer-feedback-link svg {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  padding: 8px;
  border-radius: 50%;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.8;
  color: #d6ad68;
  background: rgba(255, 248, 237, 0.06);
  box-shadow: inset 0 0 0 1px rgba(218, 177, 101, 0.2);
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.footer-feedback-link svg path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-feedback-link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.footer-feedback-link:hover,
.footer-feedback-link:focus-visible {
  color: #fff8ed;
  transform: translateY(-2px);
}

.footer-feedback-link:hover svg,
.footer-feedback-link:focus-visible svg {
  color: #fff8ed;
  background: rgba(218, 177, 101, 0.14);
  box-shadow: inset 0 0 0 1px rgba(218, 177, 101, 0.5);
}

/* WhatsApp 图标是填充型 path，与描边型图标区分处理 */
.footer-whatsapp svg path {
  fill: currentColor;
  stroke: none;
}

/* 社媒链接（竖排，图标+平台名）：
   抖音/FB/YT 为填充型 path；Instagram 为描边型（外框+圆环+实心点） */
.footer-social-link svg path {
  fill: currentColor;
  stroke: none;
}

.footer-social-link svg rect,
.footer-social-link svg circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.footer-social-link svg .social-dot {
  fill: currentColor;
  stroke: none;
}

/* 政策链接组（独立一列，位于 Follow us 右侧） */
.footer-policies {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.footer-policies > p {
  margin: 0 0 8px;
  color: #d6ad68;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* 政策链接单行显示，避免长标签在窄列折行 */
.footer-policies a {
  white-space: nowrap;
}

.footer-bottom {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(218, 177, 101, 0.22);
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 248, 237, 0.46);
  font-size: 14px;
  line-height: 1.5;
}

.footer-bottom a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 248, 237, 0.7);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease;
}

.footer-bottom a:hover,
.footer-bottom a:focus-visible {
  color: #d6ad68;
}

.footer-bottom span {
  color: #d6ad68;
  font-size: 16px;
}

@media (max-width: 920px) {
  .site-footer {
    padding: 64px 22px 22px;
  }

  .site-footer::before {
    background-size: 52px 52px;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 44px 30px;
    padding-bottom: 50px;
  }

  .footer-identity {
    grid-column: 1 / -1;
  }

  .footer-brand {
    gap: 10px;
  }

  .footer-brand img:first-child {
    width: 44px;
    height: 41px;
  }

  .footer-brand img:last-child {
    width: 164px;
  }

  .footer-tagline {
    max-width: 330px;
    margin-top: 22px;
    font-size: 16px;
  }

  .footer-bottom {
    min-height: 72px;
    align-items: flex-start;
    padding-top: 22px;
  }

  .footer-bottom p {
    max-width: 230px;
  }
}

@media (max-width: 560px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .footer-identity {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 14px;
  }
}

/* ================= Privacy Modal（统一） ================= */

body.is-privacy-open {
  overflow: hidden;
}

.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 260ms ease;
}

.privacy-modal.is-open {
  visibility: visible;
  pointer-events: auto;
}

.privacy-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(4, 18, 15, 0.72);
  backdrop-filter: blur(14px);
  opacity: 0;
  cursor: default;
  transition: opacity 260ms ease;
}

.privacy-modal.is-open .privacy-backdrop {
  opacity: 1;
}

.privacy-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(84svh, 820px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(185, 139, 66, 0.42);
  border-radius: 20px;
  color: #1c2823;
  background:
    radial-gradient(circle at 92% 0%, rgba(185, 139, 66, 0.14), transparent 30%),
    linear-gradient(160deg, #fffdf8 0%, #f4eee4 100%);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  transition: opacity 260ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.privacy-modal.is-open .privacy-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.privacy-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 38px 24px;
  border-bottom: 1px solid rgba(121, 84, 26, 0.16);
}

.privacy-header p {
  margin: 0 0 8px;
  color: #9b7439;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.privacy-header h2 {
  margin: 0;
  color: #14231e;
  font-family: "Noto Serif SC", "Cinzel", serif;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 900;
  line-height: 1.08;
}

.privacy-header > div > span {
  display: block;
  margin-top: 10px;
  color: rgba(28, 40, 35, 0.52);
  font-size: 11px;
  font-weight: 650;
}

.privacy-close {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(16, 35, 31, 0.16);
  border-radius: 50%;
  color: #10231f;
  background: rgba(255, 253, 248, 0.66);
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.privacy-close span,
.privacy-close span::before,
.privacy-close span::after {
  position: absolute;
  width: 16px;
  height: 1.5px;
}

.privacy-close span::before,
.privacy-close span::after {
  content: "";
  inset: 0;
  margin: auto;
  border-radius: 999px;
  background: currentColor;
}

.privacy-close span::before {
  transform: rotate(45deg);
}

.privacy-close span::after {
  transform: rotate(-45deg);
}

.privacy-close:hover,
.privacy-close:focus-visible {
  color: #fff8ed;
  border-color: #183a32;
  background: #183a32;
  transform: rotate(4deg);
}

.privacy-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 38px 34px;
  scrollbar-color: rgba(185, 139, 66, 0.58) transparent;
  scrollbar-width: thin;
}

.privacy-content::-webkit-scrollbar {
  width: 8px;
}

.privacy-content::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(185, 139, 66, 0.58);
  background-clip: padding-box;
}

.privacy-summary {
  margin: 0;
  color: rgba(28, 40, 35, 0.8);
  font-family: "Noto Serif SC", "Cinzel", serif;
  font-size: 18px;
  font-weight: 760;
  line-height: 1.58;
}

.privacy-content section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(121, 84, 26, 0.14);
}

.privacy-content h3 {
  margin: 0 0 10px;
  color: #10231f;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.3;
}

.privacy-content p,
.privacy-content li {
  color: rgba(28, 40, 35, 0.68);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.72;
}

.privacy-content p {
  margin: 0;
}

.privacy-content p + p {
  margin-top: 12px;
}

.privacy-content ul {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding-left: 19px;
}

.privacy-content a {
  color: #8c652c;
  font-weight: 760;
  text-decoration: underline;
  text-decoration-color: rgba(140, 101, 44, 0.34);
  text-underline-offset: 3px;
}

.privacy-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding: 18px 38px;
  border-top: 1px solid rgba(121, 84, 26, 0.16);
  background: rgba(255, 253, 248, 0.72);
  backdrop-filter: blur(12px);
}

.privacy-actions button {
  min-height: 42px;
  padding: 0 24px;
  border: 1px solid #183a32;
  border-radius: 8px;
  color: #fff8ed;
  background: #183a32;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.privacy-actions button:hover,
.privacy-actions button:focus-visible {
  background: #10231f;
  transform: translateY(-1px);
}

@media (max-width: 560px) {
  .privacy-modal {
    place-items: end center;
    padding: 0;
  }

  .privacy-dialog {
    width: 100%;
    max-height: 88svh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }

  .privacy-modal.is-open .privacy-dialog {
    transform: translateY(0);
  }

  .privacy-header {
    padding: 24px 22px 19px;
  }

  .privacy-header h2 {
    font-size: 30px;
  }

  .privacy-close {
    width: 40px;
    height: 40px;
  }

  .privacy-content {
    padding: 20px 22px 28px;
  }

  .privacy-summary {
    font-size: 16px;
  }

  .privacy-actions {
    padding: 14px 22px max(14px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .privacy-backdrop,
  .privacy-dialog {
    transition: none;
  }
}
