/* 文件夹：暗桌上的一只蓝夹子，前沿是磨砂玻璃，里面四张纸卡。 */
:root {
  --bg: #06080f;
  --ink: #e9eef7;
  --muted: #8b93a7;
  --line: rgba(255, 255, 255, .09);
  --accent: #6ea8ff;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background:
    radial-gradient(120% 90% at 50% -20%, #0e1830 0%, transparent 58%),
    radial-gradient(80% 60% at 100% 100%, rgba(70, 120, 255, .1), transparent 60%),
    var(--bg);
  color: var(--ink);
  font: 15px/1.65 ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 一层很淡的网格：让暗场有个尺度感 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}

.scene {
  min-height: 100vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 32px 40px;
  display: flex;
  flex-direction: column;
}

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4px 2px 8px;
}

.top__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -.01em;
}

.top__brand::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.top__meta {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 12px 0 20px;
}

.kicker {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.title {
  margin: 0;
  font-size: clamp(38px, 4.8vw, 62px);
  line-height: 1.06;
  font-weight: 680;
  letter-spacing: -.045em;
}

.title em {
  font-style: normal;
  background: linear-gradient(100deg, #9dc2ff, #5d8dff 55%, #8f7bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 34ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 28px 0 0;
}

.facts div { display: flex; flex-direction: column; gap: 3px; }

.facts dt {
  color: rgba(139, 147, 167, .75);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  font-size: 12.5px;
  color: rgba(233, 238, 247, .86);
}

/* ── 桌面 ── */
.bench {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 0 4px;
}

.bench__glow {
  position: absolute;
  inset: 12% 8% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(78, 132, 255, .26), transparent 72%);
  filter: blur(40px);
  pointer-events: none;
}

.bench__mat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  width: 100%;
  padding: 88px 40px 52px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(80% 60% at 50% 12%, rgba(120, 160, 255, .07), transparent 62%),
    linear-gradient(180deg, rgba(20, 26, 44, .5), rgba(9, 12, 22, .68));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 40px 120px rgba(0, 0, 0, .45);
}

.bench__hint {
  margin: 26px 0 0;
  min-height: 20px;
  color: rgba(139, 147, 167, .8);
  font-size: 12.5px;
  transition: color .25s ease;
}

.bench__hint.is-on {
  color: var(--accent);
}

/* 控制条 */
.controls {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 11, 18, .78);
  backdrop-filter: blur(14px);
}

.ctl {
  min-width: 58px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.ctl:hover { background: rgba(255, 255, 255, .12); }
.ctl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.swatches { display: flex; gap: 7px; }

.swatch {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: var(--sw);
  color: var(--sw);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.swatch:hover { transform: scale(1.15); }
.swatch.is-on { box-shadow: 0 0 0 2px #080b12, 0 0 0 3px currentColor, 0 0 14px currentColor; }
.swatch:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ── 文件夹本体 ──
   每一层都是一个绝对定位的盒子，transform-origin 在左上角；几何全由 JS 算成
   matrix3d 写进 style，所以这里只负责"长什么样"，不负责"在哪儿"。 */
.folder-root {
  position: relative;
  display: inline-block;
  width: var(--folder-w);
  height: calc(var(--folder-tab-h) + var(--folder-h));
  font: 15px/1.6 ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.folder-stage {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  outline: none;
}

.folder-stage:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 12px;
  border-radius: calc(var(--folder-r) + 8px);
}

.folder-layer {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

/* 落影：JS 把它的原点挪到夹子底边，这里只管长成一片椭圆 */
.folder-ground {
  width: calc(var(--folder-w) * 1.12);
  height: calc(var(--folder-w) * 0.3);
  margin-left: calc(var(--folder-w) * -0.06);
  margin-top: calc(var(--folder-w) * -0.15);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .62), rgba(0, 0, 0, .26) 52%, transparent 76%);
  filter: blur(calc(var(--folder-scale) * 7px));
  pointer-events: none;
}

/* 背板：形状是 clip-path 里的那条路径，标签页就长在它上沿 */
.folder-back {
  width: var(--folder-w);
  height: calc(var(--folder-tab-h) + var(--folder-h));
}

.folder-back-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--folder-inside-top), var(--folder-inside-bottom));
}

/* 口袋里的光：上沿有一条亮边，越往下越黑 */
.folder-back-fill::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 22%),
    linear-gradient(0deg, rgba(0, 0, 0, .42), transparent 46%),
    radial-gradient(120% 60% at 50% 100%, transparent 40%, rgba(0, 0, 0, .18));
}

/* 两边的折痕：一点内阴影，让背板看起来是"纸"而不是色块 */
.folder-back-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .16), transparent 9%, transparent 91%, rgba(0, 0, 0, .16));
}

.folder-back-rim {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.folder-focus {
  fill: none;
  stroke: rgba(255, 255, 255, .17);
  stroke-width: 1;
}

.folder-tab-text {
  position: absolute;
  top: 0;
  height: var(--folder-tab-h);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--folder-tab-ink);
  font-size: calc(var(--folder-tab-h) * .42);
  font-weight: 600;
  letter-spacing: .05em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  opacity: var(--folder-label, 1);
  pointer-events: none;
}

.folder-measure {
  position: absolute;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  display: inline-block;
  visibility: hidden;
  opacity: 0;
}

/* 前沿：翻下去的那片盖子。外表面和内表面都在这一层里 */
.folder-front {
  width: var(--folder-w);
  height: var(--folder-front-h);
}

.folder-face {
  position: absolute;
  inset: 0;
  border-radius: var(--folder-front-radius);
  background:
    radial-gradient(130% 90% at 50% -18%, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, rgba(255, 255, 255, .5) 0, rgba(255, 255, 255, 0) 2%),
    linear-gradient(180deg, rgba(0, 0, 0, .24) 2%, rgba(0, 0, 0, 0) 12%),
    linear-gradient(180deg, rgba(255, 255, 255, .08) 12%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, var(--folder-front-top) 0%, var(--folder-front-bottom) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .34),
    inset 0 -1px 0 rgba(0, 0, 0, .18),
    0 0 0 1px rgba(255, 255, 255, .05),
    0 -12px 26px rgba(3, 8, 22, .38);
}

/* glint / dim 是 JS 每帧按翻角算出来的，直接当不透明度用 */
.folder-face::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #000;
  opacity: var(--folder-dim, 0);
  pointer-events: none;
}

.folder-face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #fff;
  opacity: var(--folder-glint, 0);
  pointer-events: none;
}

/* 纸卡 */
.folder-item {
  width: var(--folder-doc-w);
  height: var(--folder-doc-h);
  cursor: grab;
  outline: none;
}

.folder-item:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .9);
  outline-offset: calc(var(--folder-scale) * 3px);
  border-radius: calc(var(--folder-doc-w) * .05);
}

.folder-root[data-dragging] .folder-item { cursor: grabbing; }

.folder-doc {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: calc(var(--folder-doc-w) * .022);
  width: 100%;
  height: 100%;
  padding: calc(var(--folder-doc-w) * .095) calc(var(--folder-doc-w) * .085);
  border-radius: calc(var(--folder-doc-w) * .045);
  background: var(--folder-paper);
  color: var(--folder-paper-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 calc(var(--folder-lift, 0) * 2px) calc(2px + var(--folder-lift, 0) * 9px) rgba(4, 10, 24, .35);
  overflow: hidden;
}

/* 纸面的一点斜光：不在光栅化的路径里，只影响 DOM 那一层 */
.folder-doc::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(146deg, rgba(255, 255, 255, .85), rgba(214, 224, 240, .18) 46%, rgba(120, 140, 180, .1));
  opacity: .3;
  pointer-events: none;
}

.folder-doc > * { position: relative; z-index: 1; }

.folder-doc-title {
  display: block;
  font-size: calc(var(--folder-doc-w) * .108);
  font-weight: 650;
  line-height: 1.24;
  letter-spacing: -.015em;
  color: var(--folder-paper-text);
}

.folder-doc-heading {
  display: block;
  width: 54%;
  height: calc(var(--folder-doc-w) * .038);
  border-radius: 999px;
  background: var(--folder-paper-ink-strong);
}

.folder-doc-text {
  display: block;
  margin-top: calc(var(--folder-doc-w) * .012);
  font-size: calc(var(--folder-doc-w) * .072);
  line-height: 1.42;
  color: var(--folder-paper-text);
  opacity: .62;
}

.folder-doc-line {
  display: block;
  height: max(2px, calc(var(--folder-doc-w) * .013));
  border-radius: 999px;
  background: var(--folder-paper-ink-strong);
  opacity: .62;
}

.folder-doc-block {
  display: block;
  flex: 1 1 auto;
  min-height: 12%;
  margin: calc(var(--folder-doc-w) * .018) 0;
  border-radius: calc(var(--folder-doc-w) * .03);
  background: var(--folder-paper-ink-strong);
  opacity: .24;
}

.folder-photo {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--folder-doc-w) * .045);
  overflow: hidden;
  background: #0d1220;
}

.folder-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 磨砂玻璃画布：比夹子大一圈，正好盖住前沿和溢出的那点边 */
.folder-glass {
  position: absolute;
  display: block;
  pointer-events: none;
}

@media (max-width: 900px) {
  .scene { padding: 16px 18px 90px; }
  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    align-content: start;
  }
  .bench__mat { min-height: 420px; padding: 74px 20px 40px; border-radius: 26px; }
  .facts { display: none; }
}

@media (max-width: 520px) {
  .title { font-size: 34px; }
  .lede { font-size: 13.5px; }
  .bench__mat { padding: 54px 8px 26px; min-height: 300px; }
  .bench__hint { margin-top: 16px; }
  .controls { right: 12px; bottom: 12px; left: 12px; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  .swatch, .ctl, .bench__hint { transition: none; }
}
