/* ============================================
   OGM168 个人网站 — 设计系统
   配色：暖米白底 + 金色点缀
   字体：Noto Serif SC（标题）+ 系统字体（正文）
   手机优先
   ============================================ */

/* --- CSS变量 --- */
:root {
  --bg-primary: #FAF5ED;
  --bg-secondary: #F5EFE6;
  --bg-card: #FFFFFF;
  --text-primary: #2D2D2D;
  --text-secondary: #8B7355;
  --text-muted: #B8A88A;
  --gold-primary: #C5A55A;
  --gold-strong: #D4B96E;
  --gold-light: #F0E6CC;
  --gold-bg: rgba(197, 165, 90, 0.08);
  --border: #E8DDD0;
  --border-gold: #D4C4A8;
  --shadow: rgba(45, 45, 45, 0.06);
  --shadow-hover: rgba(45, 45, 45, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font-title: 'Noto Serif SC', 'Source Han Serif SC', 'STSong', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --nav-height: 60px;
}

/* --- 基础重置 --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* --- 容器 --- */
.container {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- 导航 --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(250, 245, 237, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: box-shadow 0.3s;
}

.navbar.scrolled {
  box-shadow: 0 2px 20px var(--shadow);
}

.nav-container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2px;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  gap: 5px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 260px;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  padding: 80px 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: right 0.35s ease;
  box-shadow: -4px 0 20px var(--shadow);
}

.nav-menu.open {
  right: 0;
}

.nav-menu a {
  padding: 12px 0;
  font-size: 16px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.nav-menu a:last-child {
  border-bottom: none;
}

.nav-menu a:hover {
  color: var(--gold-primary);
}

.nav-contact-btn {
  margin-top: 12px;
  text-align: center;
  background: var(--gold-primary);
  color: #fff !important;
  border-radius: var(--radius-sm);
  padding: 12px !important;
  border-bottom: none !important;
  font-weight: 600;
}

/* --- 桌面端导航 --- */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-menu {
    position: static;
    width: auto;
    height: auto;
    background: none;
    border-left: none;
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    box-shadow: none;
  }
  .nav-menu a {
    padding: 0;
    font-size: 14px;
    border-bottom: none;
    color: var(--text-secondary);
  }
  .nav-contact-btn {
    margin-top: 0;
    padding: 8px 20px !important;
    font-size: 14px;
  }
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px 60px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--gold-light) 100%);
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(197, 165, 90, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(197, 165, 90, 0.04) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero-badge {
  display: inline-block;
  padding: 4px 16px;
  background: var(--gold-bg);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  font-size: 12px;
  color: var(--gold-primary);
  letter-spacing: 3px;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-title);
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 6px;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-family: var(--font-title);
  font-size: 16px;
  color: var(--gold-primary);
  letter-spacing: 8px;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--text-muted);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@media (min-width: 768px) {
  .hero-title { font-size: 48px; letter-spacing: 10px; }
  .hero-subtitle { font-size: 18px; letter-spacing: 12px; }
  .hero-desc { font-size: 16px; }
}

/* --- 按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s;
  letter-spacing: 1px;
}

.btn-primary {
  background: var(--gold-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--gold-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(197, 165, 90, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--gold-primary);
  border: 1.5px solid var(--gold-primary);
}

.btn-outline:hover {
  background: var(--gold-bg);
}

.btn-ghost {
  background: var(--gold-bg);
  color: var(--gold-primary);
  border: 1px solid var(--border-gold);
  padding: 8px 20px;
  font-size: 13px;
}

.btn-ghost:hover {
  background: var(--gold-light);
}

/* --- 区块通用 --- */
.section {
  padding: 64px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--gold-primary);
  letter-spacing: 4px;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 6px;
  margin-bottom: 16px;
}

.section-divider {
  width: 40px;
  height: 2px;
  background: var(--gold-primary);
  margin: 0 auto;
}

/* --- 卡片网格 --- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--shadow-hover);
  border-color: var(--border-gold);
}

.card-icon-wrap {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-bg);
  border-radius: 50%;
  color: var(--gold-primary);
  margin-bottom: 20px;
}

.card-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-link {
  font-size: 13px;
  color: var(--gold-primary);
  font-weight: 500;
}

/* --- 关于 --- */
.about {
  background: var(--bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1.5fr;
  }
}

.about-image {
  display: flex;
  justify-content: center;
}

.about-avatar {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-light);
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
}

.about-text p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.about-text .section-title {
  text-align: left;
}

.about-text .section-divider {
  margin: 0 0 20px;
}

.about-stats {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- 联系方式 --- */
.contact {
  background: var(--bg-primary);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-bg);
  border-radius: 50%;
  color: var(--gold-primary);
  margin: 0 auto 16px;
}

.contact-card h3 {
  font-family: var(--font-title);
  font-size: 16px;
  margin-bottom: 12px;
}

.contact-note {
  font-size: 13px;
  color: var(--text-secondary);
}

/* --- 页脚 --- */
.footer {
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 40px 0 24px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
}

.footer-brand h3 {
  font-family: var(--font-title);
  font-size: 18px;
  margin-bottom: 6px;
}

.footer-brand p {
  font-size: 13px;
  opacity: 0.6;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
  opacity: 0.5;
}

/* --- 联系浮窗 --- */
.contact-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
}

.float-btn {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-primary);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(197, 165, 90, 0.4);
  transition: all 0.3s;
}

.float-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(197, 165, 90, 0.5);
}

.float-panel {
  position: absolute;
  bottom: 64px;
  right: 0;
  width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px var(--shadow-hover);
  padding: 8px;
  display: none;
}

.float-panel.open {
  display: block;
}

.float-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.float-item:hover {
  background: var(--gold-bg);
}

/* --- 返回顶部 --- */
.back-top {
  position: fixed;
  bottom: 88px;
  right: 24px;
  width: 40px;
  height: 40px;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 18px;
  color: var(--text-secondary);
  box-shadow: 0 2px 12px var(--shadow);
  z-index: 98;
  transition: all 0.3s;
}

.back-top.visible {
  display: flex;
}

.back-top:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

/* --- 电话号码保护 --- */
.contact-reveal.revealed {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
}

/* --- 遮罩层 --- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* --- 子页面通用标题 --- */
.page-hero {
  padding: 100px 20px 48px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.page-hero h1 {
  font-family: var(--font-title);
  font-size: 28px;
  letter-spacing: 6px;
  margin-bottom: 12px;
}

.page-hero p {
  font-size: 14px;
  color: var(--text-secondary);
}
