/* Lumen 视觉语言：像一张安静的相纸。
   浅色、单色调，只用墨色的深浅表达层级；彩色只出现在它真正代表颜色的地方。 */

:root {
  --text: rgb(29, 29, 31);
  --text2: rgb(110, 110, 115);
  --text3: rgb(163, 163, 168);
  --line: rgba(0, 0, 0, 0.075);
  --line-strong: rgba(0, 0, 0, 0.14);
  --wash: rgba(0, 0, 0, 0.035);
  --wash-strong: rgba(0, 0, 0, 0.06);
  --paper: rgb(237, 236, 233);
  --surface: rgb(250, 250, 249);
  --sidebar: rgb(241, 240, 237);
  --toolbar: rgb(246, 245, 243);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', ui-monospace, Consolas, monospace;
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
  --spring-press: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  line-height: 1.6;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.micro {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  color: var(--text3);
  text-transform: uppercase;
  white-space: nowrap;
}

.hairline-h { height: 0.5px; background: var(--line); width: 100%; flex: none; }
.hairline-v { width: 0.5px; background: var(--line); flex: none; }

/* 玻璃质感按钮（与 Theme.swift / theme.css 一致） */
.glass {
  position: relative;
  background: rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow:
    inset 0 0.8px 0 rgba(255, 255, 255, 0.95),
    inset 0 -0.8px 0 rgba(255, 255, 255, 0.08),
    0 0 0 0.5px rgba(0, 0, 0, 0.07),
    0 3px 12px rgba(0, 0, 0, 0.07);
  transition: transform 0.22s var(--spring-press), box-shadow 0.2s ease, background-color 0.2s ease;
}

.glass:hover {
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 0.8px 0 rgba(255, 255, 255, 1),
    0 0 0 0.5px rgba(0, 0, 0, 0.1),
    0 6px 18px rgba(0, 0, 0, 0.09);
}

.glass:active {
  transform: scale(0.97);
  box-shadow:
    inset 0 0.8px 0 rgba(255, 255, 255, 0.9),
    0 0 0 0.5px rgba(0, 0, 0, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04);
}

.glass.prominent {
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 50%),
    var(--text);
  color: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow:
    inset 0 0.8px 0 rgba(255, 255, 255, 0.28),
    0 0 0 0.5px rgba(0, 0, 0, 0.2),
    0 4px 14px rgba(0, 0, 0, 0.12);
}

.glass.prominent:hover {
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 50%),
    rgb(42, 42, 45);
  box-shadow:
    inset 0 0.8px 0 rgba(255, 255, 255, 0.34),
    0 0 0 0.5px rgba(0, 0, 0, 0.22),
    0 7px 20px rgba(0, 0, 0, 0.16);
}

.glass.prominent:active {
  transform: scale(0.97);
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 50%),
    rgba(29, 29, 31, 0.85);
}

.glass-button {
  height: 28px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.glass-button-lg {
  height: 38px;
  padding: 0 20px;
  font-size: 13.5px;
}

/* 顶部导航 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(237, 236, 233, 0.78);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border-bottom: 0.5px solid var(--line);
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-ver {
  padding: 2px 6px;
  background: var(--wash);
  border-radius: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 13px;
  color: var(--text2);
  transition: color 0.15s ease;
}

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

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hero */
.hero {
  padding: 72px 0 44px;
  text-align: center;
}

.hero-badge {
  margin-bottom: 14px;
}

.hero-title {
  margin: 0 auto 16px;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--text);
}

.hero-sub {
  margin: 0 auto 28px;
  max-width: 580px;
  font-size: 15.5px;
  color: var(--text2);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-meta {
  font-size: 11.5px;
  color: var(--text3);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* 交互式工作台 */
.studio-section {
  padding: 12px 0 72px;
}

.studio-shell {
  background: var(--surface);
  border-radius: 14px;
  border: 0.5px solid var(--line-strong);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.studio-titlebar {
  height: 46px;
  background: var(--toolbar);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.traffic-lights {
  display: flex;
  gap: 7px;
}

.traffic-lights span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
}

.studio-toolbar-center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.studio-body {
  display: grid;
  grid-template-columns: 224px 0.5px 1fr 0.5px 276px;
  min-height: 480px;
}

.studio-sidebar {
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
}

.sidebar-group {
  padding: 14px 14px 16px;
}

.sidebar-heading {
  margin-bottom: 10px;
}

.looks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.look-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 4px;
  border-radius: 7px;
  border: 0.5px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.look-card:hover {
  background: var(--wash);
}

.look-card.active {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line-strong);
}

.look-swatch {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper);
}

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

.look-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text2);
}

.look-card.active .look-name {
  color: var(--text);
}

.layer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.layer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text2);
}

.layer-item.active {
  background: var(--wash-strong);
  color: var(--text);
  font-weight: 500;
}

.layer-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text3);
}

.layer-item.active .layer-dot {
  background: var(--text);
}

/* 中栏画布 */
.studio-canvas-col {
  background: var(--paper);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.canvas-stage {
  flex: 1;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

.photo-frame {
  position: relative;
  max-width: 100%;
  max-height: 380px;
  aspect-ratio: 3 / 2;
  border-radius: 3px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.12),
    0 1px 4px rgba(0, 0, 0, 0.06);
}

.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.12s linear;
}

/* 显影动画：从白纸、模糊、无色中缓缓浮现 */
.photo-frame.developing .photo-img {
  animation: developPrint 1.35s var(--spring) forwards;
}

@keyframes developPrint {
  0% {
    opacity: 0.08;
    filter: brightness(2.1) blur(14px) saturate(0);
    transform: scale(1.025);
  }
  55% {
    opacity: 0.92;
    filter: brightness(1.18) blur(2px) saturate(0.45);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 扫光动画：切换风格时一道光带掠过画面 */
.light-sweep {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    112deg,
    transparent 30%,
    rgba(255, 255, 255, 0.42) 50%,
    transparent 70%
  );
  transform: translateX(-110%);
}

.light-sweep.sweeping {
  animation: lightSweep 0.72s var(--spring) forwards;
}

@keyframes lightSweep {
  0% { opacity: 0.9; transform: translateX(-110%); }
  100% { opacity: 0; transform: translateX(110%); }
}

/* 擦除对比原图 */
.photo-original {
  position: absolute;
  inset: 0;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.32s var(--spring);
}

.photo-frame.comparing .photo-original {
  clip-path: inset(0 46% 0 0);
}

.wipe-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 54%;
  width: 1px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.photo-frame.comparing .wipe-divider {
  opacity: 1;
}

.wipe-tag {
  position: absolute;
  top: 10px;
  right: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(29, 29, 31, 0.72);
  color: #fff;
}

/* 胶片条 */
.filmstrip {
  height: 68px;
  background: var(--toolbar);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.film-thumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 6px;
  border: 0.5px solid transparent;
  font-size: 11.5px;
  color: var(--text2);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.film-thumb img {
  width: 48px;
  height: 34px;
  border-radius: 3px;
  object-fit: cover;
}

.film-thumb.active {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--line-strong);
  color: var(--text);
  font-weight: 500;
}

/* 右栏检查器 */
.studio-inspector {
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.histogram-box {
  padding: 12px 14px 10px;
}

.histogram-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.histogram-svg {
  width: 100%;
  height: 58px;
  display: block;
  background: var(--wash);
  border-radius: 4px;
}

.hist-channel {
  transition: d 0.25s var(--spring);
}
.hist-r { fill: rgba(218, 95, 88, 0.22); }
.hist-g { fill: rgba(98, 178, 118, 0.22); }
.hist-b { fill: rgba(96, 144, 214, 0.22); }
.hist-l { fill: rgba(29, 29, 31, 0.18); }

.inspector-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 6px 10px;
  gap: 4px;
}

.inspector-tab {
  height: 26px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.inspector-tab:hover { background: var(--wash); color: var(--text); }
.inspector-tab.active { background: var(--wash-strong); color: var(--text); }

.inspector-pages {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: focusPull 0.24s var(--spring);
}

@keyframes focusPull {
  from { opacity: 0.35; filter: blur(3px); transform: translateY(3px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}

/* 刻度尺滑块 */
.ruler-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  user-select: none;
}

.ruler-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.ruler-label {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
}

.ruler-val {
  font-size: 11px;
  color: var(--text2);
}

.ruler-track {
  position: relative;
  height: 22px;
  border-radius: 4px;
  background: var(--wash);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 6px;
  cursor: ew-resize;
  touch-action: none;
}

.ruler-hint {
  position: absolute;
  inset: 0 0 auto 0;
  height: 2.5px;
  border-radius: 4px 4px 0 0;
  opacity: 0.72;
}

.ruler-tick {
  width: 1px;
  height: 6px;
  background: var(--text3);
  border-radius: 1px;
  transition: height 0.12s ease, background-color 0.12s ease;
  pointer-events: none;
}

.ruler-tick.major { height: 10px; background: var(--text2); }
.ruler-tick.near { height: 14px; background: var(--text); }

.ruler-needle {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 2px;
  border-radius: 2px;
  background: var(--text);
  transform: translateX(-50%);
  pointer-events: none;
}

.studio-hint {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--text2);
}

/* 设计语言卡片 */
.craft-section,
.download-section {
  padding: 56px 0 72px;
}

.section-head {
  margin-bottom: 32px;
}

.section-title {
  margin: 8px 0 0;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.craft-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.craft-card,
.download-card {
  background: var(--surface);
  border: 0.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.craft-num { margin-bottom: 10px; }

.craft-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.craft-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.65;
}

/* 下载卡片 */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.dl-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.dl-platform {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dl-version {
  font-size: 11.5px;
  color: var(--text2);
  padding: 3px 8px;
  background: var(--wash);
  border-radius: 5px;
}

.dl-desc {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--text2);
  min-height: 44px;
}

.dl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11.5px;
  color: var(--text3);
  margin-bottom: 18px;
}

.dl-actions { margin-bottom: 16px; }

.dl-note {
  border-top: 0.5px solid var(--line);
  padding-top: 12px;
  font-size: 12.5px;
  color: var(--text2);
}

.dl-note summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
}

.dl-note p { margin: 8px 0 0; line-height: 1.6; }

/* 页脚 */
.footer { padding-bottom: 36px; }

.footer-inner {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-right { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text2); }
.footer-right a:hover { color: var(--text); }

@media (max-width: 960px) {
  .studio-body { grid-template-columns: 1fr; }
  .hairline-v { width: 100%; height: 0.5px; }
  .looks-grid { grid-template-columns: repeat(3, 1fr); }
  .craft-grid, .download-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .looks-grid { grid-template-columns: repeat(2, 1fr); }
}
