/* ============================================================
   TZY · About v6 preview — base layer
   主题：暗室放映室（cinematic dark / 朱砂 / 钨丝灯）
   仅系统字体、零外部依赖；respect prefers-reduced-motion
   ============================================================ */

:root {
  --bg: #0A0B0F;
  --bg-raise: #101218;
  --panel: #12141C;
  --panel-2: #161923;
  --ink: #F1EEE5;
  --ink-dim: #A6A39A;
  --ink-faint: #6F6D66;
  --line: rgba(241, 238, 229, .09);
  --line-strong: rgba(241, 238, 229, .18);
  --verm: #E8492F;
  --verm-bright: #FF6A4D;
  --verm-soft: rgba(232, 73, 47, .13);
  --amber: #D9A44A;
  --green: #58C48A;
  --green-soft: rgba(88, 196, 138, .12);
  --dy: #FF3B5C;
  --bili: #3D9BFF;
  --xhs: #FF7A45;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "JetBrains Mono", monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --radius: 16px;
  --shell: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg, canvas { display: block; max-width: 100%; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.shell { width: min(var(--shell), calc(100% - 48px)); margin: 0 auto; }

.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 200;
  background: var(--verm); color: #fff; padding: 10px 18px;
  border-radius: 10px; font-weight: 600; transition: top .2s;
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 2px solid var(--verm-bright); outline-offset: 3px; border-radius: 4px; }

/* ---------- 胶片颗粒 ---------- */
.grain {
  position: fixed; inset: -100px; z-index: 90; pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(8) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-46px, 30px); }
  50% { transform: translate(30px, -52px); }
  75% { transform: translate(-24px, -30px); }
}

/* ---------- 自定义光标 ---------- */
.cursor { position: fixed; inset: 0; z-index: 180; pointer-events: none; display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; }
  html.js, html.js body { cursor: none; }
  html.js a, html.js button { cursor: none; }
}
.cursor-dot, .cursor-ring {
  position: absolute; top: 0; left: 0; border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-dot { width: 6px; height: 6px; background: var(--verm-bright); }
.cursor-ring {
  width: 34px; height: 34px; border: 1px solid rgba(241, 238, 229, .4);
  transition: width .25s var(--ease-out), height .25s var(--ease-out),
              border-color .25s, background-color .25s;
}
.cursor-ring.is-hover {
  width: 56px; height: 56px;
  border-color: var(--verm-bright);
  background: rgba(232, 73, 47, .08);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 28px; height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background-color .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.topbar.is-solid {
  background: rgba(10, 11, 15, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.seal {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, #F0563A, #C93A22);
  color: #FFF6EC; display: grid; place-items: center;
  font-size: 18px; font-weight: 700;
  box-shadow: 0 4px 18px rgba(232, 73, 47, .35);
  transform: rotate(-3deg);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.25; }
.brand-copy strong { font-size: 15px; letter-spacing: .04em; }
.brand-copy small {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .18em;
  color: var(--ink-faint); text-transform: uppercase;
}
.topnav { display: flex; gap: 30px; }
.topnav a {
  font-size: 14px; color: var(--ink-dim); position: relative; padding: 4px 0;
  transition: color .25s;
}
.topnav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--verm); transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease-out);
}
.topnav a:hover { color: var(--ink); }
.topnav a:hover::after { transform: scaleX(1); transform-origin: left; }
.topbar-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600;
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  transition: border-color .25s, background-color .25s, transform .25s var(--ease-out);
}
.topbar-cta:hover { border-color: var(--verm); background: var(--verm-soft); transform: translateY(-1px); }
@media (max-width: 760px) {
  .topbar { padding: 0 18px; }
  .topnav { display: none; }
}

/* ---------- 按钮 ---------- */
.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px;
  font-size: 15.5px; font-weight: 650; letter-spacing: .01em;
  position: relative; overflow: hidden;
  transition: transform .3s var(--ease-out), box-shadow .3s, background-color .3s, border-color .3s;
  will-change: transform;
}
.button-primary {
  background: var(--verm); color: #FFF6EC;
  box-shadow: 0 10px 34px rgba(232, 73, 47, .32);
}
.button-primary:hover { box-shadow: 0 16px 44px rgba(232, 73, 47, .45); }
.button-ghost {
  border: 1px solid var(--line-strong); color: var(--ink);
  background: rgba(241, 238, 229, .02);
}
.button-ghost:hover { border-color: rgba(241, 238, 229, .4); background: rgba(241, 238, 229, .05); }
.button .arrow { transition: transform .3s var(--ease-out); }
.button:hover .arrow { transform: translate(3px, -3px); }

/* ---------- 章节公共 ---------- */
.section { padding: clamp(90px, 12vh, 150px) 0; position: relative; }
.kicker {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 26px;
}
.kicker::before {
  content: ""; width: 34px; height: 1px; background: var(--verm);
}
.kicker b { color: var(--verm-bright); font-weight: 500; }
.h2 {
  font-size: clamp(30px, 4.6vw, 54px); font-weight: 800;
  line-height: 1.18; letter-spacing: -.015em;
}
.h2 em { font-style: normal; color: var(--verm-bright); }
.section-lead { color: var(--ink-dim); max-width: 620px; margin-top: 18px; font-size: 16.5px; }

/* 行级标题遮罩 reveal */
.line { display: block; overflow: hidden; }
.line > span {
  display: inline-block; transform: translateY(110%);
  transition: transform .9s var(--ease-out);
}
.line:nth-child(2) > span { transition-delay: .1s; }
.line:nth-child(3) > span { transition-delay: .2s; }
.in .line > span, .line.in > span { transform: translateY(0); }

/* 渐入 reveal */
.js [data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 54px 0 40px;
}
.footer-shell { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.footer-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; color: var(--ink-faint); margin-top: 14px; }
.footer-legal { font-size: 13px; color: var(--ink-faint); }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line);
  padding: 18px 0; white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: inline-flex; gap: 48px; padding-right: 48px; animation: marquee 36s linear infinite; }
.marquee-track span {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .3em;
  text-transform: uppercase; color: var(--ink-faint);
}
.marquee-track span i { color: var(--verm); font-style: normal; margin-right: 12px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 取景框角标 ---------- */
.viewfinder { position: relative; }
.viewfinder i {
  position: absolute; width: 18px; height: 18px; pointer-events: none;
  border-color: var(--line-strong); border-style: solid; border-width: 0;
}
.viewfinder i:nth-of-type(1) { top: 14px; left: 14px; border-top-width: 1px; border-left-width: 1px; }
.viewfinder i:nth-of-type(2) { top: 14px; right: 14px; border-top-width: 1px; border-right-width: 1px; }
.viewfinder i:nth-of-type(3) { bottom: 14px; left: 14px; border-bottom-width: 1px; border-left-width: 1px; }
.viewfinder i:nth-of-type(4) { bottom: 14px; right: 14px; border-bottom-width: 1px; border-right-width: 1px; }

/* ---------- 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js [data-reveal], .line > span { opacity: 1; transform: none; }
  .cursor { display: none !important; }
}
