/* ==========================================================================
   基础排版、暖陶出版物框架、顶部导航栏、私享访问门厅与通用组件
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--light-text);
  background: var(--paper-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

body.gate-locked {
  overflow: hidden;
  height: 100vh;
}

h1, h2, h3, h4, p, ul, ol, figure, dl, dd, blockquote {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font: inherit;
  color: inherit;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent-terra);
  outline-offset: 3px;
}

.container {
  width: min(calc(100% - 2 * var(--gutter)), var(--container));
  margin-inline: auto;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.serif {
  font-family: var(--font-serif);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ---------- 全亮色三档纸感节奏区块（彻底告别黑底与网格点阵） ---------- */
.act-dark {
  position: relative;
  background: var(--paper-bg);
  color: var(--light-text);
  border-top: 1px solid var(--light-border);
}

.act-dark:first-of-type {
  border-top: 0;
}

.act-dark > .container {
  position: relative;
  z-index: 1;
}

.act-light {
  position: relative;
  background: var(--paper-subtle);
  color: var(--light-text);
  border-top: 1px solid var(--light-border);
}

.act-white {
  position: relative;
  background: var(--paper-card);
  color: var(--light-text);
  border-top: 1px solid var(--light-border);
}

.section-pad {
  padding-block: clamp(64px, 7.2vw, 108px);
}

section[id] {
  scroll-margin-top: 88px;
}

/* ---------- 出版级眉标与宋体主标层级 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-terra);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1.5px;
  background: var(--accent-terra);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
  margin-bottom: clamp(32px, 4vw, 52px);
}

.section-header-main {
  max-width: 740px;
}

.section-title {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--light-text);
}

.section-desc {
  margin-top: 14px;
  font-size: clamp(0.98rem, 1.2vw, 1.06rem);
  color: var(--light-text-secondary);
  max-width: 64ch;
  line-height: 1.75;
}

/* 高管引言条（暖陶咨询风标志性元素） */
.editorial-quote {
  margin-top: 18px;
  padding: 15px 20px;
  border-radius: 12px;
  background: var(--paper-bg);
  border-left: 3px solid var(--accent-terra);
  font-family: var(--font-serif);
  font-size: 0.98rem;
  color: var(--light-text);
  line-height: 1.65;
}

/* ---------- 顶部悬浮导航栏（温暖磨砂象牙白） ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(245, 241, 234, 0.90);
  border-bottom: 1px solid var(--light-border);
  color: var(--light-text);
}

.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--light-text);
  color: var(--paper-card);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.brand-text strong {
  font-family: var(--font-serif);
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--light-text);
  letter-spacing: -0.01em;
}

.brand-text span {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  color: var(--light-text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  font-size: 0.88rem;
  font-weight: 560;
  color: var(--light-text-secondary);
}

.nav-links a {
  padding-block: 6px;
  transition: color var(--t-fast) ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-terra);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- 按钮规范（胶囊暖陶主按钮 × 浓墨黑按钮 × 宣纸描边） ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 620;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast) ease, border-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary-glow {
  background: var(--accent-terra);
  color: #ffffff;
  box-shadow: 0 8px 20px -10px rgba(194, 65, 12, 0.55);
}

.btn-primary-glow:hover {
  background: var(--accent-terra-hover);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--light-text);
  color: var(--paper-card);
}

.btn-dark:hover {
  background: #292524;
  transform: translateY(-1px);
}

.btn-ghost-dark,
.btn-ghost-light {
  background: var(--paper-card);
  border-color: var(--light-border-strong);
  color: var(--light-text);
}

.btn-ghost-dark:hover,
.btn-ghost-light:hover {
  background: var(--paper-subtle);
  border-color: var(--light-text);
}

.btn-sm {
  min-height: 36px;
  padding: 7px 14px;
  font-size: 0.82rem;
}

/* ---------- 标签胶囊（克制纸感，绝无荧光底） ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 620;
  line-height: 1.4;
}

.pill-cyan {
  background: var(--accent-terra-soft);
  color: var(--accent-terra);
  border: 1px solid var(--accent-terra-border);
}

.pill-teal {
  background: var(--accent-sage-soft);
  color: var(--accent-sage);
  border: 1px solid var(--accent-sage-border);
}

.pill-slate {
  background: var(--paper-subtle);
  color: var(--light-text-secondary);
  border: 1px solid var(--light-border);
}

.pill-warn {
  background: var(--accent-amber-soft);
  color: #92400e;
  border: 1px solid #f5d08a;
}

.pill-rose {
  background: var(--accent-rose-soft);
  color: #9f1239;
  border: 1px solid #fecdd3;
}

/* ---------- 统一访问码私享会客门厅（明亮咨询出版物风格） ---------- */
.access-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 70% 55% at 15% 0%, rgba(194, 65, 12, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(22, 101, 52, 0.06), transparent 55%),
    var(--paper-bg);
  color: var(--light-text);
  transition: opacity 360ms var(--ease-out), visibility 360ms ease;
}

.access-gate.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-card {
  position: relative;
  width: min(100%, 468px);
  padding: clamp(30px, 4vw, 44px);
  border-radius: var(--radius-xl);
  background: var(--paper-card);
  border: 1px solid var(--light-border-strong);
  box-shadow: var(--shadow-editorial);
}

.gate-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.gate-card h1 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.28;
  color: var(--light-text);
}

.gate-desc {
  margin-top: 10px;
  color: var(--light-text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.gate-form {
  margin-top: 26px;
  display: grid;
  gap: 14px;
}

.gate-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 620;
  color: var(--light-text-secondary);
  margin-bottom: 6px;
}

.gate-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--light-border-strong);
  background: var(--paper-bg);
  color: var(--light-text);
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.14em;
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}

.gate-input:focus {
  outline: none;
  border-color: var(--accent-terra);
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.14);
}

.gate-error {
  min-height: 20px;
  font-size: 0.84rem;
  color: var(--accent-rose);
}

.gate-meta {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--light-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--light-text-muted);
}

.gate-demo-btn {
  border: 0;
  background: transparent;
  color: var(--accent-terra);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 650;
  padding: 2px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 统一页脚（温暖砂岩纸感） ---------- */
.site-footer {
  background: var(--paper-deep);
  color: var(--light-text-secondary);
  border-top: 1px solid var(--light-border-strong);
  padding-block: 42px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
}

.footer-grid strong {
  font-family: var(--font-serif);
  color: var(--light-text);
  font-size: 1.02rem;
}

.footer-note {
  font-size: 0.82rem;
  color: var(--light-text-muted);
  margin-top: 6px;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: 0.85rem;
}

.footer-actions button,
.footer-actions a {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--light-text-secondary);
  font-weight: 560;
}

.footer-actions button:hover,
.footer-actions a:hover {
  color: var(--accent-terra);
}

/* ---------- 响应式断层 ---------- */
@media (max-width: 960px) {
  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-nav-inner {
    min-height: 62px;
  }
  .brand-text span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
