/* Typora 官网 — 本站内容布局 + 轻量交互打磨（非终端站同构） */

@font-face {
  font-family: "HKW Sans SC";
  src: url("fonts/hkw-sans-sc-subset.woff2") format("woff2-variations"),
       url("fonts/hkw-sans-sc-subset.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #060908;
  --mist: #d7e0da;
  --mute: #7f8b84;
  --jade: #3dd6a5;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mono: "Geist Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "HKW Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(61, 214, 165, 0.28);
  color: #fff;
}

.font-mono-hkw { font-family: var(--mono); }
.font-display {
  font-family: "HKW Sans SC", "PingFang SC", system-ui, sans-serif;
  font-weight: 780;
  letter-spacing: -0.03em;
}

/* 氛围：进度 / 光斑 / 噪点（借鉴交互，不绑架版式） */
.film-grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#prog {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 60;
  background: linear-gradient(90deg, #1f9a74, #3dd6a5);
  pointer-events: none;
  box-shadow: 0 0 12px rgba(61, 214, 165, 0.4);
}

#pointer-glow {
  position: fixed;
  width: 42vw;
  height: 42vw;
  max-width: 480px;
  max-height: 480px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(61, 214, 165, 0.12) 0%, transparent 68%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.45s ease;
  mix-blend-mode: screen;
}
#pointer-glow.on { opacity: 1; }
@media (pointer: coarse) {
  #pointer-glow { display: none; }
}

.grain::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.03;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-shot {
  background-image:
    linear-gradient(105deg, rgba(6, 9, 8, 0.88) 0%, rgba(6, 9, 8, 0.45) 42%, rgba(6, 9, 8, 0.2) 62%, rgba(6, 9, 8, 0.85) 100%),
    linear-gradient(180deg, rgba(6, 9, 8, 0.25) 0%, rgba(6, 9, 8, 0.15) 45%, rgba(6, 9, 8, 0.95) 100%),
    url("previews/r/v2-light.webp");
  background-size: cover;
  background-position: 62% 22%;
  will-change: transform;
}

.hero-vignette {
  background: radial-gradient(ellipse 70% 55% at 70% 40%, transparent 0%, rgba(6, 9, 8, 0.55) 100%);
}

/* 品牌锁排：对齐终端站「图标 + 会勇禾口王 | 产品名」，本站用青绿圆标 */
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.brand-mark img {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  flex: none;
  box-shadow: 0 6px 18px -10px rgba(61, 214, 165, 0.7);
  transition: transform 0.45s var(--ease), box-shadow 0.45s ease;
}
.brand-mark:hover img {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 10px 28px -10px rgba(61, 214, 165, 0.75);
}
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  line-height: 1.1;
}
.brand-name {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f2f7f4;
  white-space: nowrap;
}
.brand-div {
  display: inline-block;
  width: 1px;
  height: 0.95em;
  flex: none;
  background: rgba(215, 224, 218, 0.28);
}
.brand-product {
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #8a968e;
  white-space: nowrap;
}

.nav-glass {
  background: rgba(6, 9, 8, 0.55);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.nav-panel.open { display: flex; }

.metric-num {
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 20%, rgba(215, 224, 218, 0.45) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.value-cell {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}
.value-cell::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  left: var(--mx, 50%);
  top: var(--my, 50%);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(61, 214, 165, 0.1), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.value-cell:hover::before { opacity: 1; }

.btn-mag {
  position: relative;
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease, background 0.25s ease;
  will-change: transform;
}
.btn-mag--jade:hover {
  box-shadow: 0 14px 44px -14px rgba(61, 214, 165, 0.45);
}
.btn-mag--solid:hover {
  box-shadow: 0 12px 40px -16px rgba(215, 224, 218, 0.35);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}
[data-reveal-child] {
  opacity: 0;
  transform: translateY(20px);
}
[data-reveal-child].in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.hero-copy > * {
  opacity: 0;
  transform: translateY(28px);
}
.hero-copy.is-ready > * {
  animation: heroRise 1s var(--ease) both;
}
.hero-copy.is-ready > *:nth-child(1) { animation-delay: 0.06s; }
.hero-copy.is-ready > *:nth-child(2) { animation-delay: 0.16s; }
.hero-copy.is-ready > *:nth-child(3) { animation-delay: 0.26s; }
.hero-copy.is-ready > *:nth-child(4) { animation-delay: 0.36s; }
.hero-copy.is-ready > *:nth-child(5) { animation-delay: 0.46s; }
@keyframes heroRise {
  to { opacity: 1; transform: translateY(0); }
}

.shot {
  position: relative;
  overflow: hidden;
}
.shot::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(6, 9, 8, 0.75));
  pointer-events: none;
}
.shot img {
  transition: transform 1.1s var(--ease);
}
.shot:hover img { transform: scale(1.05); }

/* —— Preview showcase：大舞台 + 胶片条 —— */
.preview-section {
  position: relative;
  overflow: clip;
  background:
    radial-gradient(70% 55% at 12% 0%, rgba(61, 214, 165, 0.07), transparent 55%),
    radial-gradient(55% 45% at 88% 18%, rgba(201, 160, 106, 0.05), transparent 50%),
    rgba(0, 0, 0, 0.18);
}
.preview-atmosphere {
  pointer-events: none;
  position: absolute;
  inset: 8% 5% auto;
  height: 42%;
  background: linear-gradient(90deg, transparent, rgba(61, 214, 165, 0.04), transparent);
  filter: blur(40px);
}
.preview-head {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
@media (min-width: 768px) {
  .preview-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2.5rem;
  }
}
.preview-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 9, 8, 0.45);
}
.preview-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(215, 224, 218, 0.55);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.preview-tab:hover { color: rgba(215, 224, 218, 0.9); }
.preview-tab.is-on {
  background: rgba(61, 214, 165, 0.14);
  color: #fff;
}
.preview-showcase { display: grid; gap: 1.25rem; }
.preview-hero {
  margin: 0;
  position: relative;
}
.preview-hero-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a0f0d;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 40px 100px rgba(0, 0, 0, 0.45);
}
.preview-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.55s var(--ease), transform 0.9s var(--ease);
  cursor: zoom-in;
}
.preview-hero-img.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}
.preview-hero-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "kicker index"
    "title title"
    "note note";
  gap: 0.35rem 1rem;
  margin-top: 1.1rem;
  align-items: baseline;
}
#preview-hero-kicker { grid-area: kicker; }
#preview-hero-index { grid-area: index; justify-self: end; }
.preview-hero-title {
  grid-area: title;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  color: #fff;
}
.preview-hero-note {
  grid-area: note;
  font-size: 0.92rem;
  color: rgba(215, 224, 218, 0.58);
}
.preview-rail-wrap {
  position: relative;
  margin: 0 -0.25rem;
}
.preview-rail-wrap::before,
.preview-rail-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0.4rem;
  width: 2.5rem;
  z-index: 2;
  pointer-events: none;
}
.preview-rail-wrap::before {
  left: 0;
  background: linear-gradient(90deg, rgba(6, 9, 8, 0.9), transparent);
}
.preview-rail-wrap::after {
  right: 0;
  background: linear-gradient(270deg, rgba(6, 9, 8, 0.9), transparent);
}
.preview-rail {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.35rem 0.75rem 0.85rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(61, 214, 165, 0.35) transparent;
}
.preview-thumb {
  appearance: none;
  flex: 0 0 auto;
  width: min(9.5rem, 38vw);
  scroll-snap-align: start;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  padding: 0;
  cursor: pointer;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.35s var(--ease), opacity 0.3s var(--ease);
}
.preview-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  opacity: 0.72;
  transition: opacity 0.35s var(--ease), transform 0.55s var(--ease);
}
.preview-thumb-swatch {
  display: block;
  height: 3px;
  width: 100%;
}
.preview-thumb-label {
  display: block;
  padding: 0.45rem 0.55rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: rgba(215, 224, 218, 0.55);
}
.preview-thumb:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.preview-thumb:hover img { opacity: 0.92; }
.preview-thumb.is-on {
  border-color: rgba(61, 214, 165, 0.55);
  box-shadow: 0 0 0 1px rgba(61, 214, 165, 0.2);
}
.preview-thumb.is-on img {
  opacity: 1;
  transform: scale(1.03);
}
.preview-thumb.is-on .preview-thumb-label { color: #fff; }
#gallery[data-show="free"] .preview-thumb.is-pro,
#gallery[data-show="pro"] .preview-thumb.is-free {
  display: none;
}
@media (max-width: 640px) {
  .preview-rail-wrap::before,
  .preview-rail-wrap::after { width: 1.25rem; }
  .preview-thumb { width: min(8.2rem, 42vw); }
}
@media (prefers-reduced-motion: reduce) {
  .preview-hero-img,
  .preview-thumb,
  .preview-thumb img { transition: none; }
}

.timeline { position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, rgba(61, 214, 165, 0.55), rgba(255, 255, 255, 0.08));
}
@media (min-width: 768px) {
  .timeline::before { left: 23px; }
}

.tier-row { transition: background 0.35s var(--ease); }
.tier-row:hover { background: rgba(61, 214, 165, 0.06); }

.sc-wrap { position: relative; }
.copy-btn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  border-radius: 999px;
  border: 1px solid rgba(215, 224, 218, 0.14);
  background: rgba(6, 9, 8, 0.75);
  color: var(--mute);
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
}
.copy-btn.done { color: var(--jade); }
@media (max-width: 640px) {
  .copy-btn { display: none; }
}

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  padding: 2rem;
}
#lightbox.open { display: flex; }
#lightbox .lb-stage { max-width: min(1100px, 92vw); text-align: center; }
#lightbox .lb-img {
  max-height: 78vh;
  max-width: 100%;
  border-radius: 10px;
}
#lightbox .lb-cap {
  margin-top: 0.85rem;
  color: var(--mute);
  font-size: 0.85rem;
}
#lightbox .lb-close,
#lightbox .lb-prev,
#lightbox .lb-next {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.35rem;
}
#lightbox .lb-close { top: 1.25rem; right: 1.25rem; }
#lightbox .lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
#lightbox .lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
#lightbox .lb-count {
  position: absolute;
  top: 1.4rem;
  left: 1.4rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--mute);
}
img.zoomable { cursor: zoom-in; }

/* —— 16 格式轮播 —— */
.fmt-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  max-height: none;
}
@media (min-width: 1024px) {
  .fmt-rail {
    grid-template-columns: 1fr;
    max-height: 34rem;
    overflow-y: auto;
    padding-right: 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(61, 214, 165, 0.35) transparent;
  }
}
.fmt-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  border-radius: 0.85rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--mute);
  padding: 0.55rem 0.7rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.fmt-item:hover {
  color: var(--mist);
  background: rgba(255, 255, 255, 0.03);
}
.fmt-item.is-on {
  color: #fff;
  border-color: rgba(61, 214, 165, 0.28);
  background: rgba(61, 214, 165, 0.08);
}
.fmt-num {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--jade);
  opacity: 0.85;
  min-width: 1.6rem;
}
.fmt-frame { isolation: isolate; }
.fmt-shots { background: #0a0f0d; }
.fmt-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
  opacity: 0;
  transform: scale(1.03) translateY(8px);
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease);
  pointer-events: none;
}
.fmt-shot.is-active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
  cursor: zoom-in;
}
.fmt-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.06);
}
.fmt-progress i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--jade), #7dcea0);
  transition: width 0.05s linear;
}
.fmt-nav-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 9, 8, 0.72);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.fmt-nav-btn:hover {
  border-color: rgba(61, 214, 165, 0.45);
  background: rgba(61, 214, 165, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy.is-ready > * { animation: none !important; opacity: 1; transform: none; }
  [data-reveal],
  [data-reveal-child] {
    opacity: 1 !important;
    transform: none !important;
  }
  .fmt-shot {
    transition: none !important;
    transform: none !important;
  }
}

/* —— Footer（对齐写作技能官网结构，深色适配） —— */
.site-footer {
  position: relative;
  margin-top: 0;
  padding: 46px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(61, 214, 165, 0.035), rgba(6, 9, 8, 0) 55%);
  font-size: 12px;
  color: var(--mute);
}
.site-footer-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 4%, #1f6b52 22%, var(--jade) 50%, #1f6b52 78%, transparent 96%);
  opacity: 0.85;
}
.site-footer-top {
  display: grid;
  grid-template-columns: 1.35fr repeat(2, minmax(0, 1fr));
  gap: 30px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-footer-brand {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.site-footer-brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex: none;
  background: #0f3d30;
}
.site-footer-brand b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #fff;
}
.site-footer-brand span {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--mute);
}
.site-footer-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.site-footer-k {
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.13em;
  color: rgba(127, 139, 132, 0.85);
}
.site-footer-col > span:last-child {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(215, 224, 218, 0.78);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.site-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding-top: 18px;
}
.site-footer-links {
  display: flex;
  gap: 18px;
}
.site-footer-links a {
  color: var(--mute);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}
.site-footer-links a:hover { color: #fff; }
@media (max-width: 768px) {
  .site-footer { padding: 34px 0 24px; }
  .site-footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 14px;
    padding-bottom: 20px;
  }
  .site-footer-brand { grid-column: 1 / -1; margin-bottom: 2px; }
  .site-footer-brand b { font-size: 12.5px; }
  .site-footer-k { font-size: 8px; letter-spacing: 0.08em; }
  .site-footer-col > span:last-child { font-size: 11.5px; }
  .site-footer-bottom { flex-direction: column; gap: 10px; }
}
