/*
Theme Name: beyiji 别吉
Theme URI: https://beyiji.example
Author: beyiji Editorial
Author URI: https://beyiji.example
Description: 情趣内衣知识库 · WordPress 经典主题。内容站定位（文章 + 栏目合集），模板层级与函数命名遵循 WP 标准，未来可平滑挂载 WooCommerce；当前不含任何购物功能。
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: beyiji
Tags: blog, custom-logo, featured-images, one-column, two-columns, threaded-comments, translation-ready
*/

/* ============================================
   beyiji 别吉 — 设计令牌与基础层
   --------------------------------------------
   本文件：主题头（WP 必需）、设计令牌（:root）、
   Reset、基础排版、布局容器、无障碍。
   组件与页面样式全部在 assets/css/main.css。
   ============================================ */

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colors */
  --bg-primary:   #150a14;
  --bg-secondary: #1f1020;
  --bg-tertiary:  #2a1828;
  --bg-card:      #321a30;
  --bg-elevated:  #3d1f3a;
  --gold:         #c9a961;
  --gold-light:   #e0c485;
  --gold-dark:    #9a7e44;
  --cream:        #f5e6d3;
  --rose:         #d4a0a0;
  --rose-dark:    #a07070;
  --text:         #e8d5c0;
  --text-muted:   #9a8080;
  --text-dim:     #6a5050;
  --border:       rgba(201, 169, 97, 0.15);
  --border-strong:rgba(201, 169, 97, 0.35);
  --danger:       #d44a4a;
  --success:      #4a9a6a;
  --shadow-sm:    0 2px 12px rgba(0,0,0,0.25);
  --shadow-md:    0 4px 30px rgba(0,0,0,0.35);
  --shadow-lg:    0 10px 50px rgba(0,0,0,0.5);
  --radius:       10px;
  --radius-lg:    18px;
  --transition:   0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h:     72px;
  --announce-h:   38px;
  /* 字体：中文站中文优先；Playfair/Inter 未加载时自动回退系统栈 */
  --font-cn:      'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-sans-cn: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans-cn), 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

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

/* 无障碍：仅供屏幕阅读器 */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 无障碍：跳转链接 */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  background: var(--gold);
  color: var(--bg-primary);
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; outline: 2px solid var(--cream); }

/* 统一焦点样式，保证键盘可达性 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: var(--font-cn), 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--cream);
  letter-spacing: 0.01em;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-align: center;
  letter-spacing: 0.5px;
}

.section-title-left {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 0.6rem;
}

.section-header { margin-bottom: 2.5rem; }

.gold-text { color: var(--gold); }
.gold-gradient {
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.eyebrow a { color: var(--gold); }
.eyebrow a:hover { color: var(--gold-light); text-decoration: underline; }

.dot-sep { color: var(--text-dim); margin: 0 0.45rem; }

/* ===== Layout ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }
.section { padding: 4.5rem 0; }
.section-alt {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.text-center { text-align: center; }

/* 内容页统一内边距（为固定头部 + 公告条留位） */
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: calc(var(--header-h) + var(--announce-h) + 2rem) 24px 4rem;
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .page { padding-left: 18px; padding-right: 18px; }
}
