/* ==========================================================================
   DDTV 官网 · 基础层：reset / 排版 / 容器 / 通用组件
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(10, 132, 255, 0.12), transparent 70%),
    radial-gradient(900px 520px at 8% 4%, rgba(255, 59, 48, 0.07), transparent 72%);
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  margin: 0;
}

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

ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

button,
summary {
  font: inherit;
  color: inherit;
}

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

::selection {
  background: rgba(10, 132, 255, 0.35);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

:where(a, button, summary, [tabindex]):focus:not(:focus-visible) {
  outline: none;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 200;
  translate: -50% -160%;
  padding: 10px 18px;
  border-radius: var(--pill);
  background: #fff;
  color: #000;
  font-weight: 600;
  transition: translate var(--dur-2) var(--ease);
}

.skip-link:focus-visible {
  translate: -50% 0;
}

/* ---------- 布局 ---------- */

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

.section {
  position: relative;
  z-index: 1;
  padding-block: clamp(64px, 8vw, 120px);
}

.section__head {
  max-width: 760px;
  margin-bottom: clamp(28px, 4vw, 52px);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__head h2 {
  margin-top: 14px;
  font-size: clamp(1.75rem, 3.4vw, 3rem);
  letter-spacing: -0.025em;
}

.section__sub {
  margin-top: 16px;
  max-width: 62ch;
  color: var(--text-3);
  font-size: 1.0625rem;
}

.section__head--center .section__sub {
  margin-inline: auto;
}

/* ---------- 文字 ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.eyebrow--red {
  color: var(--red);
}

/* ---------- 按钮 ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 24px;
  border-radius: var(--pill);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition:
    transform var(--dur-1) var(--ease),
    background-color var(--dur-1) var(--ease),
    box-shadow var(--dur-2) var(--ease);
}

.pill svg {
  width: 18px;
  height: 18px;
}

.pill--primary {
  background: #fff;
  color: #000;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.16);
}

.pill--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(255, 255, 255, 0.24);
}

.pill--ghost {
  border: 1px solid var(--stroke);
  background: var(--panel);
  color: var(--text);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}

.pill--ghost:hover {
  background: var(--panel-hi);
  border-color: var(--stroke-strong);
}

.pill:active {
  transform: scale(0.98);
}

/* ---------- chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid var(--stroke);
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-3);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.chip--live {
  color: var(--text);
}

.chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px rgba(255, 59, 48, 0.8);
}

/* ---------- 玻璃面板 ---------- */

.glass {
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: var(--glass);
  box-shadow: var(--shadow-card), var(--inner-light);
  backdrop-filter: blur(var(--blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: #101013;
  }

  .pill--ghost {
    background: #141418;
  }
}

/* ---------- 滚动渐显（只有 JS 在场时才隐藏内容） ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
}

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

/* ---------- 减少动效 ---------- */

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

  *,
  *::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;
  }
}
