/* ============================================================================
   和治友德 VIPG 官网 · 公共样式
   全部元素自绘美化，无原生控件；所有可交互元素具备 normal/hover/active/focus/visited 状态
   ============================================================================ */

/* ---------------- 主题变量（红金 / 墨绿金 双主题） ---------------- */
:root {
  --font-sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, "Hiragino Sans GB", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --maxw: 1240px;
  --radius: 14px;
  --radius-sm: 9px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --shadow-sm: 0 4px 14px rgba(0,0,0,.08);
  --shadow-md: 0 14px 38px rgba(0,0,0,.14);
  --shadow-lg: 0 26px 70px rgba(0,0,0,.22);
}

/* 首页主题：红金 */
.page-home {
  --primary: #C8102E;
  --primary-deep: #8E0C20;
  --primary-soft: #E63950;
  --gold: #C9A227;
  --gold-light: #E8C766;
  --gold-deep: #9C7A14;
  --ink: #2A2326;
  --ink-soft: #6b5f63;
  --cream: #FBF7EF;
  --cream-deep: #F4EBDD;
  --accent-bg: linear-gradient(135deg, #A01622 0%, #7A0C1A 55%, #5C0814 100%);
  --header-bg: rgba(255,255,255,.92);
  --btn-glow: rgba(201,162,39,.55);
}

/* 产品页主题：墨绿 + 金 */
.page-product {
  --primary: #21403a;
  --primary-deep: #13291f;
  --primary-soft: #356053;
  --gold: #C9A227;
  --gold-light: #E8C766;
  --gold-deep: #9C7A14;
  --ink: #212c29;
  --ink-soft: #5c6b66;
  --cream: #F4F6F2;
  --cream-deep: #E6EDE7;
  --accent-bg: linear-gradient(135deg, #21403a 0%, #17302a 55%, #0e211c 100%);
  --header-bg: rgba(255,255,255,.92);
  --btn-glow: rgba(201,162,39,.5);
}

/* ---------------- 重置 ---------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* 裁剪横向溢出（移动导航抽屉等）；用 clip 而非 hidden，避免破坏 position:sticky 吸顶 */
html, body { overflow-x: hidden; }
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}
img { max-width: 100%; height: auto; display: block; border: 0; }
a { color: var(--primary); text-decoration: none; transition: color .25s var(--ease); }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1,h2,h3,h4 { font-weight: 700; line-height: 1.3; color: var(--ink); }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* 无障碍跳转链接 */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 9999;
  background: var(--primary); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ============================================================================
   链接四态 / 五态
   ============================================================================ */
a { text-decoration: none; }
a:hover { text-decoration: none; }
a:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 2px;
  border-radius: 4px;
}
a:active { opacity: .82; }
a:visited { color: inherit; }

/* ============================================================================
   自绘按钮（全部四态）
   ============================================================================ */
.btn, .p-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 32px;
  font-size: 15px; font-weight: 600; letter-spacing: .5px;
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease),
              background .28s var(--ease), color .28s var(--ease), border-color .28s;
  border: 2px solid transparent;
  -webkit-tap-highlight-color: transparent;
}
.btn svg, .p-btn svg { width: 18px; height: 18px; transition: transform .28s var(--ease); }

.btn--gold, .p-btn--gold {
  color: #4a3208;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 48%, var(--gold-deep) 100%);
  box-shadow: 0 10px 26px var(--btn-glow), inset 0 1px 0 rgba(255,255,255,.5);
  border-color: rgba(255,255,255,.25);
}
.btn--gold:hover, .p-btn--gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px var(--btn-glow), inset 0 1px 0 rgba(255,255,255,.6);
  color: #3a2700;
}
.btn--gold:hover svg, .p-btn--gold:hover svg { transform: translateX(4px); }
.btn--gold:active, .p-btn--gold:active { transform: translateY(-1px) scale(.98); box-shadow: 0 6px 16px var(--btn-glow); }
.btn--gold:focus-visible, .p-btn--gold:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.btn--ghost, .p-btn--ghost {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.55);
  backdrop-filter: blur(4px);
}
.btn--ghost:hover, .p-btn--ghost:hover {
  background: rgba(255,255,255,.92); color: var(--primary-deep); border-color: #fff;
  transform: translateY(-3px);
}
.btn--ghost:active, .p-btn--ghost:active { transform: translateY(-1px) scale(.98); }
.btn--ghost:focus-visible, .p-btn--ghost:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; }

/* ============================================================================
   顶部信息条
   ============================================================================ */
.topbar {
  background: linear-gradient(90deg, var(--primary-deep), var(--primary) 55%, var(--primary-deep));
  color: #f6e9d8; font-size: 13px;
  position: relative; z-index: 1001;
}
.topbar__inner { display: flex; justify-content: space-between; align-items: center; height: 38px; gap: 16px; }
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 22px; }
.topbar__item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.topbar svg { width: 14px; height: 14px; color: var(--gold-light); }
.topbar a { color: var(--gold-light); }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar a:active { color: var(--gold-light); }
.topbar a:visited { color: var(--gold-light); }

/* ============================================================================
   主导航
   ============================================================================ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 18px rgba(0,0,0,.06);
  transition: box-shadow .3s, background .3s, transform .3s;
}
.site-header.is-scrolled { box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: 18px; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand__img { width: 200px; height: auto; border-radius: 8px; transition: transform .3s var(--ease); }
.brand:hover .brand__img { transform: scale(1.04); }
.brand:active .brand__img { transform: scale(.98); }

.mainnav__list { display: flex; align-items: center; gap: 4px; }
.navlink {
  position: relative;
  display: inline-block; padding: 10px 14px;
  color: var(--ink); font-size: 15px; font-weight: 500;
  border-radius: 8px;
}
.navlink::after {
  content: ""; position: absolute; left: 50%; bottom: 4px;
  width: 0; height: 2px; background: linear-gradient(90deg, var(--gold), var(--primary));
  transition: width .3s var(--ease), left .3s var(--ease);
}
.navlink:hover { color: var(--primary); background: rgba(200,16,46,.06); }
.navlink:hover::after { width: 60%; left: 20%; }
.navlink:active { transform: scale(.96); }
.navlink:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 1px; }
.navlink.is-active { color: var(--primary); font-weight: 700; }
.navlink.is-active::after { width: 60%; left: 20%; }
.navlink:visited { color: var(--ink); }
.navlink.is-active:visited { color: var(--primary); }

.header__cta {
  flex-shrink: 0;
  padding: 10px 22px; border-radius: 999px;
  color: #fff !important; font-weight: 600; font-size: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  box-shadow: 0 8px 20px rgba(0,0,0,.16);
  transition: transform .28s var(--ease), box-shadow .28s;
}
.header__cta:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0,0,0,.22); color: #fff; }
.header__cta:active { transform: translateY(0) scale(.97); }
.header__cta:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }

/* 移动端菜单按钮（自绘汉堡） */
.navtoggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 46px; border-radius: 10px; padding: 0 11px;
  transition: background .25s;
}
.navtoggle__bar { display: block; height: 2.5px; width: 100%; background: var(--primary); border-radius: 3px; transition: transform .3s var(--ease), opacity .25s; }
.navtoggle:hover { background: rgba(200,16,46,.1); }
.navtoggle:active { transform: scale(.92); }
.navtoggle:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 1px; }
.navtoggle.is-open .navtoggle__bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.navtoggle.is-open .navtoggle__bar:nth-child(2) { opacity: 0; }
.navtoggle.is-open .navtoggle__bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============================================================================
   面包屑
   ============================================================================ */
.breadcrumb { background: var(--cream-deep); padding: 11px 0; font-size: 13px; border-bottom: 1px solid rgba(0,0,0,.05); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); }
.breadcrumb li:not(:last-child)::after { content: "/"; color: var(--gold-deep); }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumb a:active { color: var(--primary-deep); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ============================================================================
   通用区块标题
   ============================================================================ */
.section { padding: 88px 0; position: relative; }
.sec-head { text-align: center; max-width: 780px; margin: 0 auto 56px; }
.sec-head__eyebrow {
  display: inline-block; font-size: 13px; letter-spacing: 3px; font-weight: 700;
  color: var(--gold-deep); text-transform: uppercase; margin-bottom: 14px;
}
.sec-head__title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.4vw, 40px);
  color: var(--primary-deep);
  position: relative; display: inline-block; padding-bottom: 20px;
}
.sec-head__title::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 64px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--primary));
}
.sec-head__sub { margin-top: 18px; color: var(--ink-soft); font-size: 16px; }
.sec-head--light .sec-head__title { color: #fff; }
.sec-head--light .sec-head__eyebrow { color: var(--gold-light); }
.sec-head--light .sec-head__sub { color: rgba(255,255,255,.82); }

/* ============================================================================
   页脚
   ============================================================================ */
.site-footer {
  background: linear-gradient(160deg, #2a0d13 0%, #1c080d 60%, #140508 100%);
  color: #d8c9c0; padding-top: 70px;
}
.page-product .site-footer { background: linear-gradient(160deg, #122a23 0%, #0c1d18 60%, #081310 100%); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 44px; padding-bottom: 50px; }
.footer__logo { border-radius: 50%; box-shadow: 0 0 0 3px rgba(201,162,39,.4); }
.footer__slogan { font-family: var(--font-serif); font-size: 22px; color: var(--gold-light); margin: 18px 0 10px; }
.footer__intro { font-size: 14px; color: #b7a8a0; line-height: 1.9; }
.footer__title { color: #fff; font-size: 17px; margin-bottom: 20px; position: relative; padding-bottom: 12px; }
.footer__title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 2px; background: var(--gold); }
.footer__links li { margin-bottom: 12px; }
.footer__links a { color: #c9bab2; font-size: 14.5px; position: relative; padding-left: 2px; transition: color .25s, padding-left .25s; }
.footer__links a::before { content: "›"; color: var(--gold); margin-right: 7px; transition: margin .25s; }
.footer__links a:hover { color: var(--gold-light); padding-left: 6px; }
.footer__links a:hover::before { margin-right: 10px; }
.footer__links a:active { color: var(--gold); }
.footer__links a:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.footer__links a:visited { color: #c9bab2; }
.footer__contact li { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 15px; font-size: 14.5px; color: #c9bab2; }
.footer__contact svg { width: 18px; height: 18px; color: var(--gold-light); flex-shrink: 0; margin-top: 3px; }
.footer__contact a { color: var(--gold-light); }
.footer__contact a:hover { color: #fff; text-decoration: underline; }
.footer__contact a:visited { color: var(--gold-light); }
.footer__btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  padding: 12px 26px; border-radius: 999px; color: #3a2700; font-weight: 600; font-size: 14.5px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 8px 22px rgba(201,162,39,.35);
  transition: transform .28s var(--ease), box-shadow .28s;
}
.footer__btn svg { width: 16px; height: 16px; transition: transform .28s; }
.footer__btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(201,162,39,.5); color: #2a1c00; }
.footer__btn:hover svg { transform: translateX(4px); }
.footer__btn:active { transform: translateY(0) scale(.97); }
.footer__btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.footer__bottom { border-top: 1px solid rgba(255,255,255,.09); padding: 20px 0; }
.footer__bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #9b8b83; }
.footer__beian a { color: #9b8b83; }
.footer__beian a:hover { color: var(--gold-light); }
.footer__beian a:visited { color: #9b8b83; }

/* ============================================================================
   回到顶部（自绘）
   ============================================================================ */
.backtop {
  position: fixed; right: 26px; bottom: 30px; z-index: 900;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  opacity: 0; visibility: hidden; transform: translateY(18px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), background .3s, box-shadow .3s;
}
.backtop svg { width: 22px; height: 22px; transform: rotate(90deg); }
.backtop.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.backtop:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0,0,0,.34); background: linear-gradient(135deg, var(--gold), var(--gold-deep)); }
.backtop:active { transform: translateY(-1px) scale(.94); }
.backtop:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }

/* ============================================================================
   滚动显现动画
   ============================================================================ */
.reveal { opacity: 0; transform: translateY(38px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.reveal[data-delay="4"] { transition-delay: .4s; }

/* 尊重减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================================
   404 页面
   ============================================================================ */
.error-page { min-height: 72vh; display: flex; align-items: center; padding: 70px 0; background: radial-gradient(circle at 50% 0%, #fff 0%, var(--cream) 70%); }
.error-page__inner { text-align: center; }
.error-page__code { font-family: var(--font-serif); font-size: clamp(110px, 22vw, 220px); font-weight: 800; line-height: 1; background: linear-gradient(135deg, var(--primary), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page__title { font-size: 30px; color: var(--primary-deep); margin: 8px 0 14px; }
.error-page__desc { color: var(--ink-soft); max-width: 560px; margin: 0 auto 30px; }
.error-page__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.error-page__links { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
.error-page__links a { color: var(--ink-soft); font-size: 14px; }
.error-page__links a:hover { color: var(--primary); }
.error-page__links a:visited { color: var(--ink-soft); }

/* ============================================================================
   响应式
   ============================================================================ */
@media (max-width: 1100px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .topbar__right { display: none; }
}
@media (max-width: 960px) {
  .section { padding: 64px 0; }
  .navtoggle { display: flex; }
  .header__cta { display: none; }
  .mainnav {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(320px, 82vw);
    background: #fff; box-shadow: -12px 0 40px rgba(0,0,0,.18);
    transform: translateX(108%); transition: transform .38s var(--ease), visibility 0s linear .38s;
    visibility: hidden;
    padding: 92px 26px 30px; overflow-y: auto; z-index: 1002;
  }
  .mainnav.is-open { transform: translateX(0); visibility: visible; transition: transform .38s var(--ease), visibility 0s; }
  .mainnav__list { flex-direction: column; align-items: stretch; gap: 6px; }
  .navlink { display: block; padding: 14px 16px; font-size: 16px; border-bottom: 1px solid #f0e9e0; }
  .navlink::after { display: none; }
  .navlink:hover { background: rgba(200,16,46,.06); }
  .nav__overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1001;
    opacity: 0; visibility: hidden; transition: opacity .3s;
  }
  .nav__overlay.is-open { opacity: 1; visibility: visible; }
}
@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .topbar__left { gap: 12px; }
  .topbar__item:not(.topbar__phone) { display: none; }
  .backtop { right: 16px; bottom: 18px; width: 46px; height: 46px; }
  .brand__img { width: 158px; }
  .header__inner { height: 64px; }
  .hero__inner, .p-hero__inner { min-width: 0; }
  .hero__inner > *, .p-hero__inner > * { min-width: 0; }
  .breadcrumb { font-size: 12px; }
}
