@import url('./variables.css');

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-aurora-white);
  background-color: var(--color-shanhai-deep-blue);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-aurora-white);
}

h1 { font-size: var(--font-size-6xl); }
h2 { font-size: var(--font-size-5xl); }
h3 { font-size: var(--font-size-4xl); }
h4 { font-size: var(--font-size-3xl); }
h5 { font-size: var(--font-size-2xl); }
h6 { font-size: var(--font-size-xl); }

p {
  margin-bottom: var(--spacing-4);
}

a {
  color: var(--color-zhuguang-aurora-cyan);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-zhuguang-aurora-cyan);
  opacity: 0.8;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

ul, ol {
  list-style: none;
}

/* ========== 通用类 ========== */

/* 容器 */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--spacing-8);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--spacing-12);
  }
}

/* 文本颜色 */
.text-white { color: var(--color-aurora-white); }
.text-gray { color: var(--color-mist-gray); }
.text-cyan { color: var(--color-zhuguang-aurora-cyan); }
.text-gold { color: var(--color-shanhai-sunrise-gold); }
.text-green { color: var(--color-compliance-green); }

/* 文本大小 */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }

/* 文本对齐 */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* 字重 */
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* 间距 */
.mt-4 { margin-top: var(--spacing-4); }
.mb-4 { margin-bottom: var(--spacing-4); }
.my-8 { margin-top: var(--spacing-8); margin-bottom: var(--spacing-8); }

.pt-4 { padding-top: var(--spacing-4); }
.pb-4 { padding-bottom: var(--spacing-4); }
.py-8 { padding-top: var(--spacing-8); padding-bottom: var(--spacing-8); }
.py-16 { padding-top: var(--spacing-16); padding-bottom: var(--spacing-16); }

/* 显示 */
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Flex */
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.gap-4 { gap: var(--spacing-4); }
.gap-6 { gap: var(--spacing-6); }
.gap-8 { gap: var(--spacing-8); }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* 宽度 */
.w-full { width: 100%; }
.w-auto { width: auto; }

/* 高度 */
.h-full { height: 100%; }
.h-auto { height: auto; }

/* 位置 */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

/* 圆角 */
.rounded { border-radius: var(--border-radius-base); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-xl { border-radius: var(--border-radius-xl); }
.rounded-full { border-radius: var(--border-radius-full); }

/* 隐藏 */
@media (max-width: 768px) {
  .hidden-mobile { display: none; }
}

@media (min-width: 769px) {
  .hidden-desktop { display: none; }
}

/* 滚动动画 */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* 跳过导航链接（无障碍） */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-zhuguang-aurora-cyan);
  color: var(--color-shanhai-deep-blue);
  padding: var(--spacing-2) var(--spacing-4);
  z-index: var(--z-index-tooltip);
  border-radius: var(--border-radius-base);
}

.skip-link:focus {
  top: var(--spacing-2);
}

/* 焦点样式（无障碍） */
*:focus-visible {
  outline: 2px solid var(--color-zhuguang-aurora-cyan);
  outline-offset: 2px;
}