/* ============================================================
   CreativeOS 官网
   结构：Reset → 排版 → 语义变量 → 滚动条 → 头部 → 下载 → 安装 → 页脚 → 响应式
   ============================================================ */

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

*:focus,
*:focus-visible {
  outline: none;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--canvas);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

a {
  cursor: pointer;
}

/* ---------- 排版 ---------- */
:root {
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Songti SC", "Noto Serif SC", Georgia, "Times New Roman",
    serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.45;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ---------- 语义变量 ---------- */
:root {
  --canvas: #fafaf8;
  --surface: #ffffff;
  --surface-hover: #f1f1ee;
  --brand: #e85d30;
  --brand-hover: #cf4f26;
  --brand-soft: rgba(232, 93, 48, 0.1);
  --text-primary: #1a1d24;
  --text-secondary: #565e6c;
  --text-tertiary: #8b93a0;
  --border: #e6e6e2;
  --shadow-sm: 0 1px 2px rgba(20, 24, 34, 0.05);
  --shadow-md: 0 10px 28px rgba(20, 24, 34, 0.09);
  --shadow-lg: 0 24px 56px rgba(20, 24, 34, 0.14);
  --max: 1120px;
  --gutter: 24px;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(90, 98, 112, 0.28);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(90, 98, 112, 0.45);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(90, 98, 112, 0.28) transparent;
}

/* ---------- 头部 ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-download {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  padding: 7px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f08a4a, #e85d30);
  box-shadow: 0 4px 14px rgba(232, 93, 48, 0.32);
  transition:
    box-shadow 180ms ease,
    transform 180ms ease,
    filter 180ms ease;
}

.header-download:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 18px rgba(232, 93, 48, 0.4);
}

.header-download:active {
  transform: scale(0.97);
}

.header-download:focus-visible {
  box-shadow: 0 0 0 3px rgba(232, 93, 48, 0.4);
}

/* ---------- 下载区 ---------- */
.page {
  flex: 1;
  padding: 128px var(--gutter) 40px;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}

.download {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: start;
}

.copy {
  padding-top: 28px;
}

.copy .eyebrow {
  color: var(--brand);
}

.copy h1 {
  margin-top: 24px;
  font-size: 20px;
}

.copy .desc {
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 2;
  max-width: 24em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  padding: 0 22px;
  height: 48px;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 26px rgba(232, 93, 48, 0.32);
}

.btn-primary:hover {
  background: var(--brand-hover);
  box-shadow: 0 12px 32px rgba(232, 93, 48, 0.4);
}

.btn-primary:active,
.btn-secondary:active {
  transform: scale(0.97);
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  box-shadow: 0 0 0 3px rgba(232, 93, 48, 0.4);
}

.btn-primary svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.meta {
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* 截图：产品对象优先，深色界面在浅色画布上形成主视觉 */
.shot {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #101318;
  box-shadow: var(--shadow-lg);
  transform: translateY(-24px);
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.shot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.shot:hover {
  box-shadow: 0 30px 64px rgba(20, 24, 34, 0.2);
  transform: translateY(-28px);
}

.shot img {
  width: 100%;
  height: auto;
}

/* ---------- 安装说明 ---------- */
.install {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  margin-top: 40px;
  padding-top: 40px;
}

.install .eyebrow {
  color: var(--text-tertiary);
}

.install ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.9;
}

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.footer-inner a {
  color: var(--text-tertiary);
  transition: color 180ms ease;
}

.footer-inner a:hover {
  color: var(--brand);
}

/* ---------- 入场序列（动效焦点） ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 480ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .page {
    padding-top: 104px;
  }

  .download,
  .install {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .shot {
    transform: none;
  }

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

  .install {
    margin-top: 24px;
    padding-top: 24px;
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 20px;
  }

  .copy {
    padding-top: 0;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    justify-content: center;
  }
}

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

  html {
    scroll-behavior: auto;
  }

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