/* MMZ.DIGITAL — 前沿数字艺术与设计工作室
   静态优先 · 深色先锋风 · 瑞士网格 */

:root {
  --bg: #0b0b0f;
  --bg-soft: #121218;
  --bg-card: #17171f;
  --ink: #f2f2ee;
  --ink-dim: #a8a8a0;
  --ink-faint: #6b6b66;
  --accent: #c8ff00;
  --accent-ink: #0b0b0f;
  --violet: #8f7bff;
  --line: rgba(242, 242, 238, 0.14);
  --line-strong: rgba(242, 242, 238, 0.3);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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(--accent); color: var(--accent-ink); }

.brand { color: var(--accent); font-weight: 700; letter-spacing: -0.02em; }
.lead-pre { color: var(--ink); font-weight: 400; }

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

/* ---------- 光标 ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 14px; height: 14px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.25s var(--ease), height 0.25s var(--ease), opacity 0.25s;
  opacity: 0;
}
.cursor.on { opacity: 1; }
.cursor.big { width: 56px; height: 56px; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
  background: rgba(11, 11, 15, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.08em;
  line-height: 1;
}
.nav__logo-mark { color: var(--accent); font-size: 12px; vertical-align: super; }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); font-size: 14px; color: var(--ink-dim); }
.nav__links a { transition: color 0.2s; position: relative; }
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 18px;
  color: var(--ink) !important;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
  line-height: 1;
}
.nav__cta:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) !important; }
.nav__lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding-left: clamp(16px, 3vw, 36px);
  margin-left: calc(clamp(16px, 3vw, 36px) * -0.6);
  border-left: 1px solid var(--line);
}
.nav__lang span[aria-hidden] { color: var(--accent); }
.nav__lang a { color: var(--ink-faint); transition: color 0.2s; }
.nav__lang a:hover { color: var(--ink); }
.nav__burger { display: none; background: none; border: 0; cursor: pointer; width: 32px; height: 24px; position: relative; }
.nav__burger span { position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.3s; }
.nav__burger span:nth-child(1) { top: 6px; }
.nav__burger span:nth-child(2) { bottom: 6px; }
.nav__burger.open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav__links {
    position: fixed;
    inset: 61px 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease);
  }
  .nav__links.open {
    max-height: min(calc(100svh - 61px), 520px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav__links a { padding: 16px var(--pad); border-top: 1px solid var(--line); }
  .nav__cta { border: 0; border-radius: 0; padding: 16px var(--pad); }
  .nav__lang { border-left: 0; border-top: 1px solid var(--line); padding: 16px var(--pad); margin-left: 0; justify-content: flex-start; }
  .nav__lang a { border-top: 0; padding: 0; }
  .nav__burger { display: block; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px var(--pad) 90px;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; pointer-events: none; }
.hero__meta {
  position: relative;
  display: flex;
  gap: clamp(14px, 3vw, 40px);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  margin-bottom: clamp(24px, 4vh, 48px);
  text-transform: uppercase;
}
.hero__meta span:first-child { color: var(--accent); }
.hero__title {
  position: relative;
  font-size: clamp(52px, 11.5vw, 168px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero__line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero__line > span { display: inline-block; transform: translateY(110%); }
.hero__accent {
  font-style: normal;
  color: var(--accent);
  position: relative;
}
.hero__accent::after {
  content: "";
  position: absolute;
  inset: 0.08em 0 0.08em 0;
  border: 1px solid var(--accent);
  transform: skewX(-8deg);
  opacity: 0.6;
}
.hero__bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin-top: clamp(36px, 6vh, 64px);
}
.hero__desc { max-width: 460px; color: var(--ink-dim); font-size: 16px; }
.hero__right { display: flex; align-items: flex-end; gap: 28px; flex-wrap: wrap; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__scrolldown {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero__scrolldown span {
  width: 1px;
  height: 46px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}
.hero__scrolldown span::after {
  content: "";
  position: absolute;
  left: 0; top: -100%;
  width: 100%; height: 100%;
  background: var(--accent);
  animation: drip 2.2s var(--ease) infinite;
}
@keyframes drip {
  0% { top: -100%; }
  60%, 100% { top: 100%; }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  cursor: pointer;
}
.btn--solid { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--solid:hover { transform: translate(2px, -2px); box-shadow: 0 8px 24px rgba(200,255,0,0.18); }
.btn--solid:active { transform: scale(0.96); box-shadow: none; }
.btn--ghost { color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--ghost:active { transform: scale(0.96); background: rgba(200,255,0,0.08); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- TICKER ---------- */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 14px 0;
  background: var(--bg-soft);
}
.ticker__track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: scroll 28s linear infinite;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  white-space: nowrap;
}
.ticker__track i { color: var(--accent); font-style: normal; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- 通用 SECTION ---------- */
.section { padding: clamp(80px, 12vh, 140px) var(--pad); }
.section__head { margin-bottom: clamp(40px, 6vh, 72px); }
.section__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.14em;
  display: block;
  margin-bottom: 14px;
}
.section__title {
  font-size: clamp(34px, 5.6vw, 72px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

/* ---------- ABOUT ---------- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
.about__lead {
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.75;
  color: var(--ink);
}
.about__stats { list-style: none; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.about__stats li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  background: var(--bg-soft);
}
.about__stats strong { font-family: var(--font-mono); font-size: clamp(30px, 4vw, 44px); font-weight: 700; color: var(--accent); }
.about__stats span { font-size: 14px; color: var(--ink-dim); text-align: right; }

/* ---------- SERVICES ---------- */
.services__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 1024px) {
  .services__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .services__list { grid-template-columns: 1fr; }
}
.service {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: clamp(28px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 240px;
  position: relative;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.service:hover { background: var(--bg-card); border-color: var(--line-strong); }
.service__num { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); letter-spacing: 0.14em; }
.service:hover .service__num { color: var(--accent); }
.service__name { font-size: clamp(20px, 2vw, 26px); font-weight: 700; }
.service__desc { color: var(--ink-dim); font-size: 15px; flex: 1; }
.service__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

/* ---------- WORKS ---------- */
.works__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: clamp(200px, 32vw, 380px);
  gap: 14px;
}
.work {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  transition: border-color 0.3s;
}
.work:hover { border-color: var(--accent); }
.work::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.9;
  transition: transform 0.6s var(--ease);
}
.work::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11,11,15,0.25) 0%, rgba(11,11,15,0.72) 100%);
  z-index: 0;
}
.work:hover::before { transform: scale(1.06); }
.work--a::before { background-image: url('../img/works/work-branding.jpg'); }
.work--b::before { background-image: url('../img/works/work-ai-art.jpg'); }
.work--c::before { background-image: url('../img/works/work-product.jpg'); }
.work--d::before { background-image: url('../img/works/work-robotics.jpg'); }
.work--e::before { background-image: url('../img/works/work-toy.jpg'); }
.work--f::before { background-image: url('../img/works/work-music.jpg?v=3'); }
.work__label { position: relative; font-size: 20px; font-weight: 700; z-index: 1; }
.work__desc { position: relative; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--ink-dim); margin-top: 6px; z-index: 1; }
.work__cat { position: relative; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--accent); margin-top: 14px; z-index: 1; }
.works__note { margin-top: 24px; color: var(--ink-faint); font-size: 14px; font-family: var(--font-mono); }

/* ---------- VOICES ---------- */
.voices__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}
.voice {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: border-color 0.3s;
}
.voice:hover { border-color: var(--line-strong); }
.voice p { font-size: 16px; }
.voice p::before { content: "“"; color: var(--accent); font-size: 1.6em; line-height: 0; margin-right: 4px; }
.voice footer { margin-top: auto; font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); letter-spacing: 0.1em; }

/* ---------- CONTACT ---------- */
.contact { background: var(--bg-soft); border-top: 1px solid var(--line); }
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 80px);
}
.contact__info p { color: var(--ink-dim); max-width: 420px; }
.contact__mail {
  display: inline-block;
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: clamp(18px, 2.4vw, 26px);
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
  transition: opacity 0.2s;
}
.contact__mail:hover { opacity: 0.7; }
.contact__hint { margin-top: 18px; font-size: 13px; color: var(--ink-faint); }
.contact__form { display: grid; gap: 18px; }
.contact__form label { display: grid; gap: 8px; font-size: 13px; color: var(--ink-dim); font-family: var(--font-mono); letter-spacing: 0.06em; }
.contact__form input, .contact__form select, .contact__form textarea {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 13px 16px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  transition: border-color 0.25s;
}
.contact__form input:focus, .contact__form select:focus, .contact__form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact__form textarea { resize: vertical; min-height: 110px; }
.contact__form button { justify-self: start; }
.contact__status { font-size: 14px; line-height: 1.5; min-height: 21px; margin: 0; }
.contact__status.is-ok { color: var(--accent); }
.contact__status.is-error { color: #ff6b6b; }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px var(--pad); display: grid; gap: 20px; }
.footer__row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.footer__logo { font-family: var(--font-mono); font-weight: 700; font-size: 22px; }
.footer__logo span { color: var(--accent); font-size: 12px; vertical-align: super; }
.footer__slogan { color: var(--ink-dim); font-size: 14px; letter-spacing: 0.12em; }
.footer__row--meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); letter-spacing: 0.1em; }
.footer__row--meta a:hover { color: var(--accent); }

/* ---------- 滚动显现 ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 锚点跳转目标高亮 ---------- */
.flash { position: relative; }
.flash::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-left: 3px solid var(--accent);
  background: linear-gradient(90deg, rgba(200,255,0,0.14), rgba(200,255,0,0.03) 40%, transparent 70%);
  animation: flashFade 1.8s var(--ease) forwards;
  z-index: 1;
}
@keyframes flashFade {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 0; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .works__grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .hero__scrolldown { display: none; }
}

/* ---------- 作品详情页 ---------- */
.case { padding: 140px var(--pad) 0; }
.case__hero { max-width: 1080px; }
.case__cat { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em; color: var(--accent); }
.case__title {
  font-size: clamp(36px, 5.6vw, 72px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 16px 0 20px;
}
.case__summary { max-width: 640px; color: var(--ink-dim); font-size: 17px; line-height: 1.7; }
.case__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}
.case__meta b { color: var(--ink-dim); font-weight: 500; margin-right: 8px; }
.case__cover {
  margin-top: 56px;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.case__cover img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.case__body { max-width: 760px; margin: 0 auto; padding-top: clamp(72px, 10vh, 120px); }
.case__h { font-size: clamp(26px, 3.6vw, 44px); font-weight: 800; line-height: 1.15; margin-bottom: 26px; }
.case__h em { font-style: normal; color: var(--accent); }
.case__p { color: var(--ink-dim); font-size: 16px; line-height: 1.8; margin-bottom: 20px; }
.case__inline { margin: 28px 0; }
.case__inline img { display: block; width: 100%; border-radius: 15px; border: 1px solid var(--line); }
.case__steps { list-style: none; display: grid; gap: 20px; margin: 40px 0 8px; }
.case__steps li {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 26px 28px;
  background: var(--bg-card);
}
.case__steps .step__num { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em; color: var(--accent); }
.case__steps h3 { margin: 10px 0 8px; font-size: 18px; font-weight: 700; }
.case__steps p { color: var(--ink-dim); font-size: 15px; line-height: 1.7; }
.case__outcomes { list-style: none; display: grid; gap: 14px; margin-top: 4px; }
.case__outcomes li { position: relative; padding-left: 28px; color: var(--ink-dim); font-size: 16px; line-height: 1.7; }
.case__outcomes li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.case__gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.case__gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 15px;
  border: 1px solid var(--line);
}
.case__gallery-note { margin-top: 24px; color: var(--ink-faint); font-family: var(--font-mono); font-size: 13px; }
.case__foot {
  margin-top: clamp(72px, 10vh, 120px);
  border-top: 1px solid var(--line);
  padding: 36px var(--pad) 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.case__foot a { font-size: 15px; color: var(--ink-dim); }
.case__foot a:hover { color: var(--accent); }
.case__foot .case__next-link { font-size: clamp(20px, 2.6vw, 28px); font-weight: 800; color: var(--ink); }
.case__foot .case__next-link:hover { color: var(--accent); }
.case__foot .case__next-link small { display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 400; letter-spacing: 0.2em; color: var(--ink-faint); margin-bottom: 6px; }
@media (max-width: 640px) {
  .case__gallery { grid-template-columns: 1fr; }
}

/* ---------- 可访问性：动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__line > span { transform: none; }
  .ticker__track { animation: none; }
}
