/**
 * 探芽园 Quorva - 基础样式系统 (base.css)
 * 对齐 Adobe React Spectrum S2 规范与亲子探索视觉基准
 */

:root {
  /* 品牌核心色彩 - 对齐探芽园温暖金色基调与自然探索色 */
  --color-canvas: #fadc5c;
  --color-canvas-soft: #fef4c9;
  --color-canvas-surface: #fffefb;
  
  --color-ink-strong: #232720;
  --color-ink-subtle: #61665a;
  --color-ink-faint: #8d9284;
  
  /* 功能与模块主题色 */
  --color-accent-coral: #bd4a34;
  --color-accent-forest: #466850;
  --color-accent-ocean: #335b7f;
  --color-accent-sand: #cfbe9f;
  --color-accent-focus: #bd4a34;

  /* 阴影与景深层级 */
  --shadow-sm: 0 2px 6px rgba(45, 38, 20, 0.08);
  --shadow-md: 0 8px 24px rgba(45, 38, 20, 0.12);
  --shadow-lg: 0 16px 40px rgba(45, 38, 20, 0.18);
  --shadow-card: 0 24px 50px -10px rgba(78, 62, 18, 0.28);

  /* 圆角规范 */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  /* 字体规范 */
  --font-serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* 动效过渡 */
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: 160ms var(--ease-smooth);
  --transition-normal: 280ms var(--ease-smooth);
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--color-canvas);
  color: var(--color-ink-strong);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--color-canvas);
  position: relative;
}

/* 交互无障碍与焦点环（S2 Accessible Focus） */
:focus-visible {
  outline: 3px solid var(--color-accent-focus);
  outline-offset: 4px;
}

button, a {
  -webkit-tap-highlight-color: transparent;
  color: inherit;
  text-decoration: none;
  font: inherit;
}

button {
  border: none;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

/* 按钮点击触觉缩放反馈 */
button:active:not(:disabled) {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 选中文字样式 */
::selection {
  background-color: var(--color-accent-coral);
  color: #ffffff;
}

/* 标题基础样式 */
h1, h2, h3, h4, h5 {
  font-weight: 600;
  color: var(--color-ink-strong);
  line-height: 1.2;
}

/* 辅助与无障碍隐藏 */
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 动效降级支持 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
