/* ==========================================================================
   flodo — 静态还原
   设计令牌与度量取自 flodo.fehey.com（2026-10-19）
   ========================================================================== */

/* ---------- 字体：SN Pro（5 个子集，与原站 @font-face 一致） ---------- */
@font-face {
  font-family: "SN Pro";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/65fc772c4643e854.0bxlnzl9bpm8m.woff2") format("woff2");
  unicode-range: U+460-52F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "SN Pro";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/cc4a1a05c8db2009.23q25f_752nei.woff2") format("woff2");
  unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116;
}
@font-face {
  font-family: "SN Pro";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/198f49f584e678d5.09fj6q3lvhmry.woff2") format("woff2");
  unicode-range: U+102-103, U+110-111, U+128-129, U+168-169, U+1A0-1A1, U+1AF-1B0, U+300-301, U+303-304, U+308-309, U+323, U+329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "SN Pro";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/eaed145d02744eee.35xty34b5sfj1.woff2") format("woff2");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "SN Pro";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/1e186ec339189cd7.p.2iablov63zk5c.woff2") format("woff2");
  unicode-range: U+??, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 设计令牌（Radix Sand + 自定义 app 色） ---------- */
:root {
  color-scheme: light dark;

  --sand-1: #fdfdfc;
  --sand-2: #f9f9f8;
  --sand-3: #f1f0ef;
  --sand-4: #e9e8e6;
  --sand-5: #e2e1de;
  --sand-6: #dad9d6;
  --sand-7: #cfceca;
  --sand-8: #bcbbb5;
  --sand-9: #8d8d86;
  --sand-10: #82827c;
  --sand-11: #63635e;
  --sand-12: #21201c;

  --app: #f6f4f0;

  --accent-9: #21201c;
  --accent-10: #373631;
  --accent-contrast: #ffffff;
  --accent-11: #64635e;
  --accent-a3: rgba(32, 16, 0, 0.063);
  --accent-a4: rgba(31, 21, 0, 0.098);
  --accent-a5: rgba(31, 24, 0, 0.129);
  --accent-a8: rgba(21, 18, 0, 0.286);

  --font-ui: "SN Pro", -apple-system, "system-ui", "Segoe UI", Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --logo-filter: none;
  --sand-a6: rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --sand-1: #111110;
    --sand-2: #191918;
    --sand-3: #222221;
    --sand-4: #2a2a28;
    --sand-5: #31312e;
    --sand-6: #3b3a37;
    --sand-7: #494844;
    --sand-8: #62605b;
    --sand-9: #6f6d66;
    --sand-10: #7c7b74;
    --sand-11: #b5b3ad;
    --sand-12: #eeeeec;

    --app: #191918;

    --accent-9: #eeeeec;
    --accent-10: #e5e5e3;
    --accent-contrast: #24230a;
    --accent-11: #b3b3b0;
    --accent-a3: rgba(246, 246, 232, 0.075);
    --accent-a4: rgba(254, 254, 235, 0.106);
    --accent-a5: rgba(251, 251, 236, 0.137);
    --accent-a8: rgba(255, 255, 246, 0.337);

    --logo-filter: invert(1);
    --sand-a6: rgba(255, 250, 237, 0.176);
  }
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--sand-1);
  color: var(--sand-12);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--sand-12);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 页面骨架 ---------- */
.page {
  min-height: 100dvh;
}

.container {
  width: 100%;
  max-width: 36rem; /* max-w-xl = 576px */
  margin: 0 auto;
  padding: 64px 24px;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .container {
    padding-top: 80px;
    padding-bottom: 80px;
  }
}

/* ---------- 导航 ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sand-12);
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  filter: var(--logo-filter);
}

.brand-name {
  padding-top: 2px;
  font-weight: 500;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-size: 14px;
  line-height: 20px;
  color: var(--sand-11);
  text-decoration: none;
  transition: color 0.15s ease-out;
}

.nav-link:hover {
  color: var(--sand-12);
}

/* ---------- 下载按钮（含图标滑入动画） ---------- */
.btn {
  --dl-icon-slot: 22px;
  --dl-padding: 0.75rem;
  --dl-icon-travel: calc(var(--dl-padding) + 20px);

  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 9999px;
  font-weight: 450;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  cursor: default;
  will-change: transform;
  outline: none;
  transition: background-color 0.15s ease-out, box-shadow 0.15s ease-out,
    color 0.15s ease-out, filter 0.15s ease-out, scale 0.15s ease-out;
}

.btn:active {
  scale: 0.97;
}

.btn-small {
  --dl-icon-slot: 22px;
  --dl-padding: 0.5rem;
  height: 28px;
  padding: 0 8px;
  font-size: 13px;
  line-height: 1.5;
  gap: 4px;
}

.btn-large {
  --dl-icon-slot: 24px;
  --dl-padding: 1rem;
  height: 40px;
  padding: 0 16px;
  font-size: 15px;
  line-height: 1.54;
  gap: 8px;
}

.btn-solid {
  background: var(--accent-9);
  color: var(--accent-contrast);
  box-shadow: inset 0 0 0 0.5px var(--accent-a8);
}

.btn-solid:hover {
  background: var(--accent-10);
}

.btn-solid:active {
  filter: brightness(0.95);
}

.btn-soft {
  background: var(--accent-a3);
  color: var(--accent-11);
}

.btn-soft:hover {
  background: var(--accent-a4);
}

.btn-soft:active {
  background: var(--accent-a5);
}

.dl-icons {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.dl-apple,
.dl-arrow {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.dl-apple {
  left: var(--dl-padding);
}

.dl-apple > svg {
  width: 100%;
  height: 100%;
}

.dl-arrow {
  right: var(--dl-padding);
  opacity: 0.6;
  transform: translateX(var(--dl-icon-travel));
}

.dl-content {
  display: inline-flex;
  align-items: center;
}

.dl-label {
  display: inline-block;
  margin-left: var(--dl-icon-slot);
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .dl-apple,
  .dl-arrow,
  .dl-label {
    transition: transform 0.22s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.18s;
  }

  .dl-apple,
  .dl-arrow {
    transition: transform 0.22s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.18s,
      filter 0.22s;
  }

  .dl-apple {
    filter: blur(0);
    transform: translate(0) scale(1);
  }

  .dl-arrow {
    transform: translateX(var(--dl-icon-travel)) scale(0.85);
    filter: blur(2px);
  }

  .btn:hover .dl-apple {
    transform: translateX(calc(-1 * var(--dl-icon-travel))) scale(0.85);
    opacity: 0.6;
    filter: blur(2px);
  }

  .btn:hover .dl-label {
    transform: translateX(calc(-1 * var(--dl-icon-slot)));
  }

  .btn:hover .dl-arrow {
    opacity: 1;
    filter: blur(0);
    transform: translate(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition-property: background-color, box-shadow, color;
  }
  .btn:active {
    scale: 1;
  }
}

/* ---------- 主图 ---------- */
.shot-wrap {
  padding-top: 40px;
}

.shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
  line-height: 0;
  cursor: zoom-in;
  box-shadow: 0 0 0 1px var(--sand-4);
}

.shot picture {
  display: block;
}

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

.shot:focus-visible {
  outline: 2px solid var(--sand-12);
  outline-offset: 2px;
}

/* ---------- 正文 ---------- */
.intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 40px;
  font-size: 15px;
  line-height: 28px;
  color: var(--sand-11);
}

.intro h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 28px;
  color: var(--sand-12);
}

.intro p {
  margin: 0;
}

.inline-link {
  color: var(--sand-12);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.specs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  line-height: 19.5px;
  color: var(--sand-9);
}

.specs svg {
  width: 13px;
  height: 13px;
}

.spec-divider {
  width: 0.5px;
  height: 12px;
  margin: 0 4px;
  background: var(--sand-6);
  transform: rotate(12deg);
}

/* ---------- 作者卡 ---------- */
.author-wrap {
  padding-top: 48px;
}

.author-card {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: 16px;
  background: var(--app);
  font-size: 15px;
  line-height: 28px;
}

@media (prefers-color-scheme: dark) {
  .author-card {
    border: 0.5px solid var(--sand-a6);
  }
}

.avatar {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--sand-4);
}

.author-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 16px;
}

.author-head {
  padding: 4px 0;
}

.author-name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 500;
  line-height: 23.1px;
  color: var(--sand-12);
}

.author-desc {
  margin: 0;
  font-size: 15px;
  line-height: 23.1px;
  color: var(--sand-11);
}

.projects {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  color: var(--sand-12);
}

.project {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.project img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 2px;
  object-fit: contain;
}

.project span {
  font-size: 13px;
  line-height: 19.5px;
  color: var(--sand-11);
  transition: color 0.15s ease-out;
}


.project:hover span {
  color: var(--sand-12);
}

.capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  color: var(--sand-11);
}

.capability {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  line-height: 19.5px;
  color: var(--sand-11);
}

.release-meta {
  margin: 0;
  padding-top: 4px;
  font-size: 13px;
  line-height: 19.5px;
  color: var(--sand-9);
}

.release-meta[hidden] {
  display: none;
}

/* ---------- 页脚 ---------- */
.footer-wrap {
  padding-top: 40px;
}

.footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  line-height: 20px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-links a {
  color: var(--sand-11);
  text-decoration: none;
  transition: color 0.15s ease-out;
}

.footer-links a:hover {
  color: var(--sand-12);
}

.footer-spacer {
  flex: 1;
}

/* ---------- 内容页（更新日志 / 隐私政策） ---------- */
.page-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 40px;
  font-size: 15px;
  line-height: 28px;
  color: var(--sand-11);
}

.page-intro h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 28px;
  color: var(--sand-12);
}

.page-intro p {
  margin: 0;
}

.page-intro .updated {
  font-size: 14px;
  line-height: 20px;
  color: var(--sand-9);
}

.log-list {
  display: flex;
  flex-direction: column;
  padding-top: 24px;
  font-size: 15px;
  line-height: 28px;
  color: var(--sand-11);
}

.log-entry + .log-entry {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px dashed var(--sand-6);
}

.log-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.log-version {
  font-weight: 500;
  color: var(--sand-12);
}

.log-date {
  font-size: 14px;
  line-height: 20px;
  color: var(--sand-9);
}

.log-entry h2 {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 28px;
  color: var(--sand-12);
}

.log-entry ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 0;
  padding-left: 20px;
  list-style: disc;
}

.log-entry li::marker {
  color: var(--sand-8);
}

.policy {
  display: flex;
  flex-direction: column;
  padding-top: 24px;
  font-size: 15px;
  line-height: 28px;
  color: var(--sand-11);
}

.policy section + section {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px dashed var(--sand-6);
}

.policy h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 28px;
  color: var(--sand-12);
}

.policy-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.policy-body p {
  margin: 0;
}

/* ---------- 大图弹窗 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: zoom-out;
}

@media (min-width: 640px) {
  .lightbox {
    padding: 40px;
  }
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--sand-1) 60%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: lb-fade 0.18s ease-out;
}

.lightbox-frame {
  position: relative;
  width: 100%;
  max-width: min(64rem, calc(133.222dvh - 6.66112rem));
  overflow: hidden;
  border-radius: 24px;
  line-height: 0;
  box-shadow: 0 32px 64px -24px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--sand-4);
  animation: lb-in 0.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.lightbox-frame img {
  width: 100%;
  height: auto;
}

@keyframes lb-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes lb-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox-backdrop,
  .lightbox-frame {
    animation: none;
  }
}

body.lightbox-open {
  overflow: hidden;
}
