/* ==========================================================================
   DIRUISI — 基础样式（重置 / 排版 / 可访问性）
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }

[hidden] { display: none !important; }
img { height: auto; }

h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- 标题排版 ---------- */
h1, h2, h3, .u-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink);
}

h1 { font-size: var(--text-display); line-height: var(--leading-tight); }
h2 { font-size: var(--text-3xl); line-height: 1.2; }
h3 { font-size: var(--text-xl); line-height: 1.32; }
h4 { font-size: var(--text-md); line-height: 1.5; font-weight: 600; }

p { color: var(--ink-2); }

strong { font-weight: 600; color: var(--ink); }

small { font-size: var(--text-xs); }

/* ---------- 通用容器 ---------- */
.shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--narrow { max-width: 1040px; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(40px, 4.5vw, 72px); }
.section--bordered { border-top: 1px solid var(--line-soft); }

.rule {
  height: 1px;
  background: var(--line-soft);
  border: 0;
  margin: 0;
}

/* ---------- 小标签 ---------- */
.eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.4;
}

.eyebrow--ink { color: var(--ink-3); }

/* ---------- 可访问性 ---------- */
.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: fixed;
  top: 8px;
  left: 8px;
  z-index: 400;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--text-sm);
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* 鼠标用户不显示焦点框，键盘用户清楚可见 */
:focus:not(:focus-visible) { outline: none; }

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 打印（随手可读的商品页） ---------- */
@media print {
  .site-header, .site-footer, .contact-dock, .no-print { display: none !important; }
  body { background: #fff; }
}
