/* ===========================================================
   Mike(高维意识) · 入定工程师 · 暖冷交界
   Design tokens from TOKENS (5 colors · film-grain · vignette)
   =========================================================== */

:root {
  --bg:        #0a0a0a;
  --accent:    #d9a262;   /* 球状灯打在皮肤的高光 */
  --cool:      #204b6d;   /* 窗外冷青蓝 */
  --aux:       #5a6040;   /* 窗帘森绿 */
  --fg:        #e8d5b0;   /* 蛋椅米色 */
  --fg-dim:    #8a8169;
  --serif-cn:  "Noto Serif SC", "Source Han Serif SC", "PingFang SC", serif;
  --serif-en:  "Playfair Display", "Times New Roman", serif;
  --mono:      "SF Mono", "Menlo", "Consolas", monospace;
  --hud-size:  10.5px;
  --hud-tr:    3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif-cn);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center,
              rgba(10,10,10,0) 40%,
              rgba(0,0,0,0.45) 80%,
              rgba(0,0,0,0.85) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ---- grain / bokeh 装饰层 ---- */
.grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  opacity: 0.08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9  0 0 0 0 0.85  0 0 0 0 0.7  0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.bokeh {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at 18% 28%, rgba(217,162,98,0.18) 0, transparent 14%),
    radial-gradient(circle at 82% 64%, rgba(217,162,98,0.10) 0, transparent 18%),
    radial-gradient(circle at 50% 50%, rgba(32,75,109,0.12) 0, transparent 60%);
}

/* ---- HUD 四角小字 ---- */
.hud {
  position: fixed; z-index: 50; pointer-events: none;
  font-family: var(--mono);
  font-size: var(--hud-size);
  letter-spacing: var(--hud-tr);
  color: var(--fg-dim);
  text-transform: uppercase;
  opacity: 0.85;
}
.hud-tl { top: 14px; left: 18px; }
.hud-tr { top: 14px; right: 18px; }
.hud-bl { bottom: 14px; left: 18px; }
.hud-br { bottom: 14px; right: 18px; }

@media (max-width: 600px) {
  .hud { font-size: 9px; }
  .hud-bl, .hud-br { display: none; }
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 36px;
  background: linear-gradient(180deg, rgba(10,10,10,0.75) 0%, rgba(10,10,10,0) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav-logo {
  font-family: var(--serif-cn); font-weight: 500;
  font-size: 15px;
  color: var(--fg); text-decoration: none;
  letter-spacing: 1px;
}
.nav-menu {
  list-style: none; display: flex; gap: 32px;
  margin: 0; padding: 0;
}
.nav-menu a {
  font-family: var(--serif-cn); font-size: 14px;
  color: var(--fg); text-decoration: none;
  letter-spacing: 2px;
  position: relative;
  transition: color .3s;
}
.nav-menu a:hover { color: var(--accent); }
.nav-menu a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.nav-menu a:hover::after { transform: scaleX(1); }
.nav-cta {
  font-family: var(--serif-cn); font-size: 13px;
  color: var(--bg); text-decoration: none;
  background: var(--accent);
  padding: 8px 14px; border-radius: 2px;
  letter-spacing: 2px;
  transition: background .3s;
}
.nav-cta:hover { background: var(--fg); }

@media (max-width: 760px) {
  .nav { padding: 14px 18px; }
  .nav-menu { display: none; }
  .nav-logo { font-size: 14px; }
  .nav-cta { font-size: 12px; padding: 6px 10px; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  width: 100%; height: 360vh;
  min-height: 600px;
  display: grid;
  grid-template-areas: "stack";
}
.hero > * { grid-area: stack; }

.hero-canvas {
  position: sticky; top: 0;
  width: 100%; height: 100vh;
  object-fit: cover; object-position: center;
  filter: brightness(0.9) contrast(1.05) saturate(0.95);
}
.hero-video {
  position: absolute; top: 0;
  width: 100%; height: 100vh;
  object-fit: cover; object-position: center;
  filter: brightness(0.9) contrast(1.05) saturate(0.95);
}

.hero-video { display: none; }   /* 默认 canvas,JS 失败时显示 */

.hero-content {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 5;
  text-align: center;
  width: 100%;
  padding: 0 24px;
}

/* HERO 巨字:1 实心 + 1 描边 */
.hero-name {
  position: relative;
  margin: 0;
  font-family: var(--serif-en);
  font-weight: 800;
  font-size: clamp(64px, 14vw, 220px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.hero-name-fill, .hero-name-stroke {
  display: block;
}
.hero-name-fill > span,
.hero-name-stroke > span {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px) scale(.96);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1),
              transform .9s cubic-bezier(.2,.7,.2,1);
}
.hero-name-stroke {
  position: absolute; inset: 0;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
  text-stroke: 2px var(--accent);
  transform: translate(6px, 6px);
}
.hero-name-stroke > span {
  position: relative;
}
.hero-name-fill > span { color: var(--fg); }
.hero-name-stroke > span { color: transparent; }

.hero-name-fill.is-in > span,
.hero-name-stroke.is-in > span {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero-sub {
  margin: 28px 0 18px;
  font-family: var(--serif-cn);
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 32px);
  color: var(--accent);
  letter-spacing: 6px;
}
.hero-sub-inner {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s .25s ease, transform 1s .25s cubic-bezier(.2,.7,.2,1);
}
.hero-sub-inner.is-in { opacity: 1; transform: translateY(0); }

.hero-slogan {
  margin: 12px 0 0;
  font-family: var(--serif-en);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(16px, 2vw, 26px);
  color: var(--fg);
  letter-spacing: 0.5px;
  opacity: 0.95;
}
.hero-slogan .kc {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  filter: blur(4px);
  transition: opacity .6s cubic-bezier(.2,.7,.2,1),
              transform .6s cubic-bezier(.2,.7,.2,1),
              filter .6s cubic-bezier(.2,.7,.2,1);
}
.hero-slogan .kc {
  font-family: var(--serif-cn);
  font-style: normal;
}

.hero-meta {
  margin-top: 36px;
  font-family: var(--serif-cn);
  font-size: 13px;
  color: var(--fg-dim);
  letter-spacing: 6px;
  opacity: 0;
  transition: opacity 1s 1.2s;
}
.hero-meta.is-in { opacity: 1; }

.hero-scroll-cue {
  position: absolute;
  bottom: 60px; left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 48px;
}
.cue-line {
  display: block;
  width: 1px; height: 38px;
  background: linear-gradient(180deg, transparent, var(--fg-dim));
  animation: drop 2.2s ease-in-out infinite;
}
@keyframes drop {
  0%   { transform: translateY(-12px); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateY(20px); opacity: 0; }
}

/* =========================================================
   MANIFESTO / 理念
   ========================================================= */
.manifesto {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.manifesto-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.75) contrast(1.05);
}
.manifesto-mask {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(10,10,10,0.7) 0%, rgba(10,10,10,0.95) 80%);
}
.manifesto-inner {
  position: relative; z-index: 2;
  text-align: center;
  padding: 80px 24px;
  max-width: 1100px;
}
.manifesto h2 {
  margin: 0;
  font-family: var(--serif-cn);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 1.25;
  color: var(--fg);
  letter-spacing: 8px;
}
.manifesto h2 .kc {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  filter: blur(4px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1),
              transform .7s cubic-bezier(.2,.7,.2,1),
              filter .7s cubic-bezier(.2,.7,.2,1);
}
.manifesto h2 .kc,
.kinetic.is-in .kc {
  opacity: 1; transform: translateY(0); filter: blur(0);
}
.manifesto-en {
  margin: 40px 0 0;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: clamp(16px, 1.8vw, 22px);
  color: var(--accent);
  letter-spacing: 2px;
}
.manifesto-rule {
  margin: 36px auto 0;
  width: 60px; height: 2px;
  background: var(--aux);
}

/* =========================================================
   DATA / 数据条
   ========================================================= */
.stats {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap;
  gap: 32px;
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(90,96,64,0.4);
  border-bottom: 1px solid rgba(90,96,64,0.4);
}
.stat {
  flex: 1 1 200px;
  text-align: center;
  min-width: 180px;
}
.stat-num {
  font-family: var(--serif-en);
  font-weight: 800;
  font-size: clamp(48px, 6vw, 80px);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  margin-top: 12px;
  font-family: var(--serif-cn);
  font-size: 13px;
  color: var(--fg-dim);
  letter-spacing: 4px;
}
.stat-sep {
  width: 1px; height: 80px;
  background: rgba(232,213,176,0.18);
}

@keyframes statpop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.stat.is-in .stat-num {
  animation: statpop .6s cubic-bezier(.2,.7,.2,1);
}

/* =========================================================
   WORKS / 板块
   ========================================================= */
.works {
  padding: 120px 24px 80px;
  max-width: 1280px;
  margin: 0 auto;
}
.works-head {
  margin-bottom: 64px;
  text-align: center;
}
.works-title {
  margin: 0;
  font-family: var(--serif-cn);
  font-weight: 800;
  font-size: clamp(48px, 7vw, 96px);
  color: var(--fg);
  letter-spacing: 12px;
}
.works-title .kc {
  display: inline-block;
  opacity: 0; transform: translateY(28px); filter: blur(4px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1),
              transform .7s cubic-bezier(.2,.7,.2,1),
              filter .7s cubic-bezier(.2,.7,.2,1);
}
.works-title.is-in .kc {
  opacity: 1; transform: translateY(0); filter: blur(0);
}
.works-sub {
  margin: 18px auto 0;
  font-family: var(--serif-cn);
  font-size: 14px;
  color: var(--fg-dim);
  letter-spacing: 3px;
}
.works-rule {
  margin: 32px auto 0;
  width: 80px; height: 2px;
  background: var(--aux);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #0d0d0d;
  border: 1px solid rgba(232,213,176,0.08);
  transition: transform .6s cubic-bezier(.2,.7,.2,1),
              border-color .4s;
  cursor: pointer;
  transform-style: preserve-3d;
  perspective: 800px;
}
.card-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.85) saturate(0.95);
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1),
              filter .6s;
  will-change: transform;
}
.card-mask {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
              rgba(10,10,10,0.2) 0%,
              rgba(10,10,10,0.9) 100%);
  z-index: 1;
}
.card-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 28px;
  display: flex; flex-direction: column;
  align-items: flex-start;
}
.card-no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--card-accent, var(--accent));
  margin-bottom: 14px;
}
.card-title {
  margin: 0 0 10px;
  font-family: var(--serif-cn);
  font-weight: 700;
  font-size: 22px;
  color: var(--fg);
  letter-spacing: 2px;
}
.card-desc {
  margin: 0 0 18px;
  font-family: var(--serif-cn);
  font-size: 13px;
  color: var(--fg);
  opacity: 0.8;
  line-height: 1.6;
}
.card-tag {
  display: inline-block;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 12px;
  color: var(--card-accent, var(--accent));
  border: 1px solid var(--card-accent, var(--accent));
  padding: 4px 10px;
  border-radius: 2px;
  letter-spacing: 2px;
}

.card:hover {
  border-color: var(--card-accent, var(--accent));
  transform: translateY(-4px) rotateX(2deg) rotateY(-2deg);
}
.card:hover .card-video {
  transform: scale(1.08);
  filter: brightness(0.95) saturate(1);
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  padding: 120px 24px 100px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.contact-title {
  margin: 0;
  font-family: var(--serif-cn);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 80px);
  color: var(--fg);
  letter-spacing: 10px;
}
.contact-title .kc {
  display: inline-block;
  opacity: 0; transform: translateY(28px); filter: blur(4px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1),
              transform .7s cubic-bezier(.2,.7,.2,1),
              filter .7s cubic-bezier(.2,.7,.2,1);
}
.contact-title.is-in .kc {
  opacity: 1; transform: translateY(0); filter: blur(0);
}
.contact-grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.contact-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 32px 20px;
  border: 1px solid rgba(232,213,176,0.12);
  background: rgba(232,213,176,0.02);
  text-decoration: none;
  color: var(--fg);
  transition: border-color .3s, background .3s;
  cursor: pointer;
}
.contact-card:hover {
  border-color: var(--accent);
  background: rgba(217,162,98,0.05);
}
.contact-key {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--fg-dim);
  margin-bottom: 14px;
}
.contact-val {
  font-family: var(--serif-cn);
  font-size: 18px;
  color: var(--fg);
  letter-spacing: 2px;
}
.contact-val.muted { color: var(--fg-dim); font-style: italic; font-size: 14px; }
.qr-placeholder {
  width: 110px; height: 110px;
  border: 1px dashed var(--fg-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 2px;
  color: var(--fg-dim);
  text-align: center;
  line-height: 1.4;
}

/* =========================================================
   FOOTER + 过渡段
   ========================================================= */
.footer {
  position: relative;
  width: 100%;
  min-height: 60vh;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border-top: 1px solid rgba(90,96,64,0.3);
}
.footer-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.8) contrast(1.05);
}
.footer-mask {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.4) 0%, rgba(10,10,10,0.92) 80%);
}
.footer-inner {
  position: relative; z-index: 2;
  text-align: center;
  padding: 80px 24px;
}
.footer-quote {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: clamp(16px, 2vw, 22px);
  color: var(--fg);
  letter-spacing: 1px;
  margin: 0;
}
.footer-meta {
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 3px;
  text-transform: uppercase;
}
.footer-sep { margin: 0 12px; color: var(--aux); }

/* =========================================================
   REVEAL 入场
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1s cubic-bezier(.2,.7,.2,1),
              transform 1s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.nav.reveal { transition-delay: 0s; }
.hero-meta { /* keep */ }

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-name-fill > span,
  .hero-name-stroke > span,
  .hero-sub-inner,
  .hero-slogan .kc,
  .hero-meta,
  .reveal,
  .manifesto h2 .kc,
  .works-title .kc,
  .contact-title .kc {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
