/* ============================================================
   青鸾官网 · 基础层：reset / 排版 / 按钮 / 通用块
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

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

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(79, 227, 166, 0.24);
  color: #fff;
}

:focus-visible {
  outline: 3px solid rgba(79, 227, 166, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------------------------------------------------- 布局 */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.section {
  padding: var(--sec-y) 0;
  position: relative;
}

.section-tight {
  padding: calc(var(--sec-y) * 0.55) 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--brand);
  margin-bottom: 16px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--grad);
}

.h2 {
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0;
}

.h3 {
  font-size: 20px;
  line-height: 1.45;
  font-weight: 600;
}

.lead {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-2);
}

.small {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-3);
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.01em;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------------------------------------------------- 按钮 */
.btn {
  --btn-h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  -webkit-user-select: none;
  user-select: none;
}

.btn-sm {
  --btn-h: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.btn-lg {
  --btn-h: 52px;
  padding: 0 26px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

.btn-solid {
  background: #F2F5F6;
  color: #07090B;
  border-color: #F2F5F6;
}

.btn-solid:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(242, 245, 246, 0.16);
}

.btn-solid:active {
  transform: translateY(0);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border-color: var(--line-2);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-3);
  transform: translateY(-1px);
}

.btn-brand {
  background: var(--brand);
  color: var(--brand-ink);
  border-color: var(--brand);
  font-weight: 700;
}

.btn-brand:hover {
  background: #6BEDB5;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(79, 227, 166, 0.24);
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-block[disabled] {
  opacity: 1;
}

/* ---------------------------------------------------------- 卡片 */
.card {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.012));
  transition: border-color var(--t-mid) var(--ease), transform var(--t-mid) var(--ease),
    background-color var(--t-mid) var(--ease);
}

.card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}

/* ---------------------------------------------------------- 入场动效 */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: 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;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------- 跳过导航 */
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
  transition: top var(--t-fast) var(--ease);
}

.skip:focus {
  top: 16px;
}

/* ---------------------------------------------------------- 通用小件 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}

.tag-brand {
  border-color: rgba(79, 227, 166, 0.28);
  background: var(--brand-soft);
  color: var(--brand);
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* 某些组件自己声明了 display，会覆盖 UA 的 [hidden]，这里统一兜底 */
[hidden] {
  display: none !important;
}

.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;
}
