@charset "UTF-8";
/* ==========================================================================
   base.css — reset / 字体栈 / 排版基线 / 无障碍工具类 / 全局焦点态
   --------------------------------------------------------------------------
   龙之旅 · 凤凰国旅企业官网
   边界（design-spec §10.1）：只允许写 reset、排版基线、链接默认样式、
   .skip-link / .sr-only / 全局 :focus-visible / ::selection / 滚动行为。
   禁止写任何具体组件或页面布局。
   ★ 本文件不出现任何 #hex —— 所有颜色走 tokens.css 的 var()。
   ========================================================================== */

/* ---------- 1. reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ol, ul,
fieldset, legend {
  margin: 0;
  padding: 0;
}

ul[class],
ol[class] {
  list-style: none;
}

body {
  min-height: 100%;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  letter-spacing: var(--ls-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
  border-style: none;
}

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

button {
  background: none;
  border: 0;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

hr {
  border: 0;
  border-top: var(--border-1) solid var(--color-border);
  margin: 0;
}

/* ---------- 2. 标题与正文基线 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-text-strong);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-4xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  font-weight: var(--fw-bold);
}

h2 {
  font-size: var(--fs-3xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  font-weight: var(--fw-bold);
}

h3 {
  font-size: var(--fs-2xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  font-weight: var(--fw-semibold);
}

h4 {
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
  font-weight: var(--fw-semibold);
}

p {
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
}

/* 长文页面（legal / news-detail）由 .prose 分档放宽行高 */
.prose p,
.prose li {
  line-height: var(--lh-loose);
}

p + p,
p + ul,
p + ol,
ul + p,
ol + p {
  margin-top: var(--stack-body-to-body);
}

strong,
b {
  font-weight: var(--fw-semibold);
}

small {
  font-size: var(--fs-sm);
}

/* 证件号 / 备案号 / 信用代码：等宽 + 不折行（content-plan §0） */
.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-normal);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- 3. 链接默认样式 ---------- */
a {
  color: var(--color-link);
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: from-font;
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

/* 正文内的行内链接必须保持下划线，避免只靠颜色区分（WCAG 1.4.1） */
.prose a,
p a:not([class]),
li a:not([class]) {
  text-decoration: underline;
}

/* ---------- 4. 全局焦点态（design-spec §9.2） ---------- */
:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-border-focus);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-xs);
}

/* 深色区块内的焦点环自动切成橙色（令牌作用域已在 tokens.css 定义） */
.section--dark :focus-visible,
.on-dark :focus-visible {
  outline-color: var(--color-border-focus-on-dark);
}

/* 鼠标点击不出现外框，键盘必须出现 */
:focus:not(:focus-visible) {
  outline: none;
}

::selection {
  background-color: var(--color-primary-100);
  color: var(--color-neutral-900);
}

/* HTML hidden 属性必须真的隐藏（作者样式里的 display:flex/grid 会盖掉 UA 规则）
   这是全站唯一允许的 !important 之一：它保护的是语义属性，不是视觉偏好。 */
[hidden] {
  display: none !important;
}

/* ---------- 5. 无障碍工具类（全站仅此 3 个，不再扩张） ---------- */
.sr-only {
  position: absolute !important;
  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: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-skip-link);
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  min-height: var(--tap-min);
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transform: translateY(calc(-100% - var(--space-4)));
  transition: transform var(--dur-fast) var(--ease-out);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--color-text-inverse);
  text-decoration: none;
}

/* 锚点跳转时抵消 sticky 头部高度 */
:target,
[id] {
  scroll-margin-top: var(--anchor-offset);
}

/* ---------- 6. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* ---------- 7. 打印 ---------- */
@media print {
  .site-header,
  .site-footer,
  .bottom-bar,
  .to-top,
  .nav-overlay,
  .skip-link {
    display: none !important;
  }

  body {
    background: var(--color-bg);
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: var(--fs-xs);
    word-break: break-all;
  }
}
