/* 袁大钰官网 · 自定义样式 */

/* [Phase 1] 本地字体（原 Google Fonts @import 已移除，woff2 位于 css/fonts/）
   字重与原模板一致：Sans 400/500/600/700，Serif 400/600/700 */
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/noto-sans-sc/noto-sans-sc-v40-chinese-simplified_latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/noto-sans-sc/noto-sans-sc-v40-chinese-simplified_latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/noto-sans-sc/noto-sans-sc-v40-chinese-simplified_latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/noto-sans-sc/noto-sans-sc-v40-chinese-simplified_latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Serif SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/noto-serif-sc/noto-serif-sc-v35-chinese-simplified_latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Serif SC';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/noto-serif-sc/noto-serif-sc-v35-chinese-simplified_latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Serif SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/noto-serif-sc/noto-serif-sc-v35-chinese-simplified_latin-700.woff2') format('woff2');
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.font-serif {
  font-family: "Noto Serif SC", "Source Han Serif SC", SimSun, serif;
}

/* 导航下拉兼容 */
.group:hover .group-hover\:block {
  display: block;
}

/* 页面通用标题区 */
.page-header {
  background: linear-gradient(135deg, #cf1035 0%, #a30d2a 100%);
  color: #fff;
  padding: 4rem 0 3rem;
}

@media (min-width: 768px) {
  .page-header {
    padding: 5rem 0 4rem;
  }
}

/* 按钮 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background-color: #cf1035;
  color: #fff;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.btn-primary:hover {
  background-color: #a30d2a;
  transform: scale(1.03);
}
.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background-color: #175a93;
  color: #fff;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.btn-secondary:hover {
  background-color: #114670;
  transform: scale(1.03);
}
.btn-secondary:active {
  transform: scale(0.98);
}

/* 表单 */
.input-field {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e8e4de;
  border-radius: 0.5rem;
  background-color: #fff;
  color: #2d2926;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-field:focus {
  border-color: #175a93;
  box-shadow: 0 0 0 3px rgba(23, 90, 147, 0.15);
}

/* 社交按钮 */
.social-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background-color: #175a93;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  transition: background-color 0.2s;
}
.social-btn:hover {
  background-color: #114670;
}

/* 移动端菜单展开 */
#mobile-menu.open {
  display: block;
}

/* 返回顶部显示 */
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* 焦点环 */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #175a93;
  outline-offset: 2px;
}

/* 减弱动效 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
