/* ==========================================================================
   真略科技官网 · 基础层
   Tokens / Reset / Typography / Buttons / Utilities / Motion
   ========================================================================== */

:root {
  /* 品牌色 */
  --navy-950: #071c33;
  --navy-900: #0b2a4a;
  --navy-800: #123a63;
  --navy-700: #1a4b7a;
  --blue: #1e6fff;
  --blue-600: #155ee6;
  --blue-700: #0f4fc4;
  --cyan: #00c2ff;

  /* 中性色 */
  --bg: #f5f8fc;
  --bg-alt: #edf3fa;
  --surface: #ffffff;
  --text: #1a2233;
  --text-muted: #5a6b82;
  --text-faint: #5f7187;
  --border: #e3eaf4;
  --border-strong: #cfdae9;
  --success: #0e9f6e;
  --danger: #d64545;

  /* 字体 */
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  /* 尺寸 */
  --container: 1200px;
  --header-h: 72px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --pill: 999px;
  --section-y: clamp(56px, 8vw, 96px);
  --gutter: clamp(20px, 4vw, 32px);

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(11, 42, 74, 0.05), 0 4px 12px -4px rgba(11, 42, 74, 0.08);
  --shadow-md: 0 14px 36px -14px rgba(11, 42, 74, 0.18);
  --shadow-lg: 0 36px 72px -30px rgba(11, 42, 74, 0.32);
  --shadow-blue: 0 14px 30px -12px rgba(30, 111, 255, 0.55);

  /* 动效 */
  --ease: cubic-bezier(0.22, 0.68, 0.2, 1);
  --dur-1: 150ms;
  --dur-2: 220ms;
  --dur-3: 340ms;

  /* 层级 */
  --z-raised: 10;
  --z-header: 100;
  --z-backdrop: 900;
  --z-drawer: 950;

  /* 焦点 */
  --focus: #1e6fff;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.nav-open {
  overflow: hidden;
}

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

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

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
}

h2 {
  font-size: clamp(1.625rem, 3vw, 2.5rem);
}

h3 {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
}

p {
  text-wrap: pretty;
}

a {
  color: var(--blue-600);
  text-decoration: none;
}

a:hover {
  color: var(--blue-700);
}

img,
svg {
  display: block;
}

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

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

button {
  cursor: pointer;
}

::selection {
  background: rgba(30, 111, 255, 0.18);
  color: var(--navy-900);
}

:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

/* 深色区块的动态焦点色 */
.section--dark,
.page-hero,
.hero,
.cta-band,
.site-header,
.drawer,
.site-footer {
  --focus: #7fc4ff;
}

/* --------------------------------------------------------------------------
   布局基础
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: 940px;
}

.section {
  padding-block: var(--section-y);
  background: var(--surface);
}

.section--muted {
  background: var(--bg);
}

.section--tight {
  padding-block: clamp(40px, 5vw, 64px);
}

.section--dark {
  background: var(--navy-900);
  color: #fff;
}

.section--flush {
  padding-top: 0;
}

/* --------------------------------------------------------------------------
   通用排版组件
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.section--dark .eyebrow,
.on-dark .eyebrow {
  color: var(--cyan);
}

.lead {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  line-height: 1.78;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.section-head__main {
  max-width: 720px;
}

.section-head h2 {
  color: var(--navy-900);
}

.section-head .lead {
  margin-top: 16px;
  max-width: 60ch;
}

.section-head--center {
  display: block;
  text-align: center;
}

.section-head--center .eyebrow {
  display: flex;
  justify-content: center;
}

.section-head--center .eyebrow::before {
  display: none;
}

.section-head--center .lead {
  margin-inline: auto;
}

.section--dark .section-head h2,
.on-dark h2 {
  color: #fff;
}

.section--dark .lead,
.on-dark .lead {
  color: rgba(255, 255, 255, 0.68);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--pill);
  background: rgba(30, 111, 255, 0.09);
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
}

.badge--cyan {
  background: rgba(0, 194, 255, 0.12);
  color: #00749b;
}

.badge--on-dark {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
}

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm {
  width: 18px;
  height: 18px;
}

.icon--lg {
  width: 28px;
  height: 28px;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

/* --------------------------------------------------------------------------
   按钮与链接
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
  transition: transform var(--dur-2) var(--ease),
    box-shadow var(--dur-2) var(--ease),
    background-color var(--dur-2) var(--ease),
    border-color var(--dur-2) var(--ease),
    color var(--dur-2) var(--ease);
}

.btn .icon {
  transition: transform var(--dur-2) var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:hover .icon {
  transform: translateX(2px);
}

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

.btn-primary {
  background: linear-gradient(135deg, #1a65f0 0%, var(--blue-600) 100%);
  color: #fff;
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  color: #fff;
  background: linear-gradient(135deg, #1a65f0 0%, var(--blue-600) 100%);
  box-shadow: 0 18px 40px -12px rgba(21, 94, 230, 0.66);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-outline {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--navy-900);
}

.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue-700);
  box-shadow: var(--shadow-sm);
}

.btn-sm {
  min-height: 40px;
  padding-inline: 18px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-600);
  font-size: 15px;
  font-weight: 600;
  transition: gap var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}

.text-link:hover {
  gap: 10px;
  color: var(--blue-700);
}

.text-link--on-dark {
  color: rgba(255, 255, 255, 0.82);
}

.text-link--on-dark:hover {
  color: #fff;
}

/* --------------------------------------------------------------------------
   滚动渐显（仅在 JS 可用时隐藏初始状态）
   -------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

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

/* --------------------------------------------------------------------------
   小屏微调
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  :root {
    --header-h: 64px;
    --section-y: 56px;
  }

  h1 {
    font-size: clamp(1.9rem, 8vw, 2.6rem);
  }

  h2 {
    font-size: clamp(1.5rem, 6.4vw, 2rem);
  }

  .eyebrow {
    margin-bottom: 12px;
    font-size: 11px;
    letter-spacing: 0.14em;
  }

  .btn {
    min-height: 48px;
  }
}
