/* ============================================================
   LUTONG STUDIO · Reset
   基础重置：统一盒模型、移除默认间距、修复移动端 100vh 等问题
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  /* 移动端真实视口高度修正 */
  height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  line-height: var(--leading-normal);
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

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

img {
  height: auto;
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text);
}

p {
  color: var(--color-text-secondary);
}

/* 表单控件统一外观 */
input,
textarea,
select {
  appearance: none;
  -webkit-appearance: none;
}

/* 移除 number input 上下箭头 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 可访问性：跳转导航链接（视觉隐藏，聚焦时显示） */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: var(--z-overlay);
  padding: 12px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-hover);
  border-radius: var(--radius-sm);
  color: var(--color-text);
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* 焦点可见性（键盘操作） */
:focus-visible {
  outline: 2px solid var(--color-accent-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 隐藏元素 */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 选择文本颜色 */
::selection {
  background: rgba(124, 92, 255, 0.35);
  color: var(--color-white);
}
