/* ============================================================
   Flint 官网样式
   设计基调：暖白纸面 + 墨色文字 + 一点燧石橙点色
   ============================================================ */

:root {
  color-scheme: light dark;

  --bg: #faf9f6;
  --bg-soft: #f4f2ec;
  --surface: #ffffff;
  --ink: #171612;
  --ink-soft: #3a3830;
  --muted: #6e6960;
  --line: #e7e3da;
  --line-strong: #d5cfc3;

  --accent: #e25822;
  --accent-ink: #b8430f;
  --accent-soft: #fdf0e8;

  --shadow-sm: 0 1px 2px rgba(26, 20, 8, 0.06);
  --shadow-lg: 0 2px 4px rgba(26, 20, 8, 0.04), 0 28px 56px -24px rgba(26, 20, 8, 0.28);

  --radius: 16px;
  --max: 1080px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI",
    "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e0c;
    --bg-soft: #14120f;
    --surface: #1a1815;
    --ink: #f4f1ea;
    --ink-soft: #ded8cc;
    --muted: #9d968b;
    --line: #292620;
    --line-strong: #3b362d;

    --accent: #ff8a52;
    --accent-ink: #ff9a68;
    --accent-soft: #2a1710;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 60px -24px rgba(0, 0, 0, 0.8);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

::selection {
  background: var(--accent);
  color: #fff;
}

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

.wrap {
  width: min(var(--max), 100% - 48px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 8px;
}

/* ---------- 导航 ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  transition: border-color 0.2s ease;
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.mark {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  flex: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.mark svg {
  width: 15px;
  height: 15px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  font-size: 14.5px;
  color: var(--muted);
}

.nav-links a {
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav .btn {
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: 9px;
}

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

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  --btn-bd: var(--line-strong);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid var(--btn-bd);
  border-radius: 11px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease;
}

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

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

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.btn-primary {
  --btn-bg: var(--ink);
  --btn-fg: var(--bg);
  --btn-bd: var(--ink);
}

.btn-primary:hover {
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--ink) 70%, transparent);
}

.btn-ghost:hover {
  background: var(--bg-soft);
  border-color: var(--line-strong);
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  padding: clamp(56px, 8vw, 88px) 0 clamp(36px, 5vw, 56px);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -180px;
  width: min(880px, 130%);
  height: 560px;
  transform: translateX(-50%);
  background: radial-gradient(
    50% 52% at 50% 45%,
    color-mix(in srgb, var(--accent) 16%, transparent),
    transparent 72%
  );
  pointer-events: none;
}

.hero > .wrap {
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

h1 {
  margin: 22px 0 0;
  font-size: clamp(56px, 10vw, 88px);
  font-weight: 650;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.tagline {
  margin: 18px 0 0;
  font-size: clamp(19px, 2.8vw, 25px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
}

.lede {
  max-width: 540px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}

.meta li + li {
  padding-left: 24px;
  border-left: 1px solid var(--line-strong);
}

/* ---------- 截图 ---------- */

.shot {
  margin: clamp(40px, 6vw, 64px) auto 0;
  max-width: 960px;
}

.shot img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.shot figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---------- 通用 section ---------- */

.section {
  padding: clamp(64px, 9vw, 104px) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 620px;
  margin-bottom: clamp(32px, 5vw, 48px);
}

.kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-head > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15.5px;
}

/* ---------- 功能卡片 ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature {
  padding: clamp(22px, 3vw, 30px);
  background: var(--bg);
}

.feature .ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--accent-ink);
}

.feature .ico svg {
  width: 18px;
  height: 18px;
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.72;
}

/* ---------- 界面切换 ---------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}

.tab {
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected="true"] {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.stage img {
  width: 100%;
}

.stage img[hidden] {
  display: none;
}

.stage img.is-in {
  animation: fade 0.28s ease both;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 下载 ---------- */

.dl-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.dl-card {
  padding: clamp(24px, 3vw, 32px);
}

.dl-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.dl-logo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 18px -10px var(--accent);
}

.dl-logo svg {
  width: 26px;
  height: 26px;
}

.dl-name {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.dl-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.dl-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}

.dl-actions .btn {
  width: 100%;
}

.hash {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  word-break: break-all;
}

.hash b {
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.steps-card {
  padding: clamp(22px, 3vw, 28px);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
}

.step:first-child {
  padding-top: 0;
}

.step:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.step .num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
}

.step h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.step p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.note {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.note svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 2px;
  color: var(--accent-ink);
}

.note p {
  margin: 0;
}

/* ---------- 常见问题 ---------- */

.faq {
  max-width: 760px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 21px 40px 21px 0;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.faq details p {
  margin: 0;
  padding: 0 32px 22px 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.78;
}

.faq details p + p {
  padding-top: 0;
  margin-top: -8px;
}

.faq code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* ---------- 页脚 ---------- */

.foot {
  padding: 52px 0 36px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.foot-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
}

.foot-brand {
  max-width: 340px;
}

.foot-brand p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  font-size: 14px;
  color: var(--muted);
}

.foot-links a {
  transition: color 0.15s ease;
}

.foot-links a:hover {
  color: var(--ink);
}

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dl-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }

  .nav-inner {
    gap: 16px;
  }

  .nav .btn {
    margin-left: auto;
  }

  .meta {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .meta li + li {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(var(--max), 100% - 36px);
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .actions .btn {
    flex: 1 1 100%;
  }

  .shot img,
  .stage {
    border-radius: 10px;
  }

  .foot-bottom {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
