/* ==========================================================
   泽凡设计工作室 · 深炭描线风官网
   Charcoal textured base + colored outline + soft shadow
   - 背景：深炭 (#181613) + 细点阵质感
   - 色块：浅纸填充 + 2.5px 彩色描边 + 轻投影（无硬偏移）
   - 品牌四色作描边 / 强调色：粉 #FF4D9D / 黄 #FFD23F / 蓝 #2E6BFF / 绿 #25C96A
   ========================================================== */

:root {
  --bg: #181613;            /* 深炭 */
  --bg-2: #211E19;          /* 略浅面板 */
  --paper: #F4F1EA;         /* 浅纸（色块填充） */
  --ink: #1A1714;           /* 近黑（纸上文字） */
  --muted: rgba(244, 241, 234, 0.62);
  --hairline: rgba(244, 241, 234, 0.14);
  --white: #FFFFFF;

  --pink: #FF4D9D;
  --yellow: #FFD23F;
  --blue: #2E6BFF;
  --green: #25C96A;
  --gold: #E8B04B;

  --stroke-w: 2.5px;        /* 描边更细，贴近线描感 */
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.5);     /* 轻投影 */
  --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.42);

  --font-display: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Space Mono", "JetBrains Mono", "SF Mono", monospace;
  --radius: 0px;
  --radius-soft: 999px;
  --max-w: 1280px;
  --section-pad: clamp(64px, 8vw, 120px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-display);
  /* 深炭 + 细点阵质感 */
  background-color: var(--bg);
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1.4px);
  background-size: 22px 22px;
  color: var(--paper);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Typography ----------------------------------------------------------- */
h1, h2, h3, h4, p { margin: 0; }
.display-1 {
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 900;
}
.display-2 {
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 900;
}
.title-1 { font-size: clamp(28px, 3.4vw, 44px); font-weight: 900; line-height: 1.15; }
.title-2 { font-size: clamp(22px, 2.4vw, 32px); font-weight: 900; line-height: 1.2; }
.title-3 { font-size: 20px; font-weight: 900; line-height: 1.3; }
.body-lg { font-size: 18px; line-height: 1.7; }
.body { font-size: 16px; line-height: 1.7; }
.caption {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mono { font-family: var(--font-mono); }

/* Outline primitives ---------------------------------------------------- */
.nb-block {
  border: var(--stroke-w) solid var(--ink);
  box-shadow: var(--shadow);
  background: rgba(244, 241, 234, 0.78);
  backdrop-filter: blur(85px);
  -webkit-backdrop-filter: blur(85px);
  color: var(--ink);
}
.nb-block.pink { border-color: var(--pink); }
.nb-block.yellow { border-color: var(--yellow); }
.nb-block.blue { border-color: var(--blue); }
.nb-block.green { border-color: var(--green); }
.nb-block.ink { border-color: var(--ink); }
.nb-block.black {
  background: rgba(24, 22, 19, 0.6);
  color: var(--paper);
  border-color: var(--hairline);
  backdrop-filter: blur(85px);
  -webkit-backdrop-filter: blur(85px);
}

.nb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 28px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  border: var(--stroke-w) solid var(--ink);
  box-shadow: var(--shadow-sm);
  background: var(--yellow);
  color: var(--ink);
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
  text-align: center;
}
.nb-btn:hover { transform: translateY(-3px); box-shadow: 0 20px 42px rgba(0, 0, 0, 0.5); }
.nb-btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.nb-btn.pink { background: var(--pink); }
.nb-btn.blue { background: var(--blue); color: var(--white); }
.nb-btn.green { background: var(--green); }
.nb-btn.black { background: var(--ink); color: var(--paper); border-color: var(--paper); }

.nb-pill {
  display: inline-block;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-sm);
  background: var(--paper);
  color: var(--ink);
}

/* Logo & recoloring ---------------------------------------------------- */
.logo {
  width: 48px;
  height: 48px;
  background-color: var(--paper);
  -webkit-mask: url('../assets/logo-mark.png') center / contain no-repeat;
          mask: url('../assets/logo-mark.png') center / contain no-repeat;
  flex: 0 0 auto;
}
.logo-sm { width: 36px; height: 36px; }
.logo-lg { width: 72px; height: 72px; }
.logo-light { background-color: var(--gold); }    /* 深炭底 → 金色 LOGO */
.logo-dark { background-color: var(--ink); }      /* 浅纸底 → 近黑 LOGO */

/* Layout --------------------------------------------------------------- */
.container { width: 92%; max-width: var(--max-w); margin: 0 auto; }
section { padding: var(--section-pad) 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-48 { gap: 48px; }

/* Header / Nav --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-name {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--gold);
}
.brand-name span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: .7;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 15px;
  font-weight: 700;
  padding: 8px 0;
  border-bottom: 3px solid transparent;
  transition: border-color .15s ease;
}
.nav-links a:hover, .nav-links a.active { border-bottom-color: var(--yellow); }

.mobile-menu-btn {
  display: none;
  width: 44px; height: 44px;
  border: var(--stroke-w) solid var(--paper);
  background: var(--yellow);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.mobile-menu-btn span {
  display: block; height: 3px; width: 100%; background: var(--ink);
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .navbar .nb-btn { display: none; }
  .mobile-menu-btn { display: flex; }
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--paper);
  border-bottom: var(--stroke-w) solid var(--pink);
  padding: 24px;
  flex-direction: column;
  gap: 16px;
  color: var(--ink);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 22px;
  font-weight: 900;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 8px;
}

/* Hero ----------------------------------------------------------------- */
.hero {
  min-height: calc(100vh - 85px);
  display: flex;
  align-items: center;
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--yellow);
  color: var(--ink);
  border: var(--stroke-w) solid var(--ink);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero h1 { margin-bottom: 24px; }
.hero p.body-lg { margin-bottom: 36px; max-width: 520px; opacity: .92; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-visual {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 20px;
  min-height: 460px;
}
.hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  border: var(--stroke-w) solid var(--ink);
  box-shadow: var(--shadow);
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}
.hero-card:nth-child(1) { border-color: var(--pink); }
.hero-card:nth-child(2) { border-color: var(--blue); }
.hero-card:nth-child(3) { border-color: var(--green); }
.hero-card:nth-child(4) { border-color: var(--yellow); }
.hero-card .placeholder {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(26,23,20,.08) 0px,
    rgba(26,23,20,.08) 8px,
    transparent 8px,
    transparent 16px
  );
}
.hero-card h3 {
  position: relative;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}
.hero-card .caption {
  position: relative;
  margin-top: 6px;
  opacity: .72;
}

.sticker {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}
.sticker.star { top: -24px; right: -24px; width: 80px; height: 80px; color: var(--pink); }
.sticker.arrow { bottom: 60px; left: -30px; width: 80px; height: 80px; color: var(--yellow); }
.sticker.spiral { bottom: -20px; right: 40px; width: 72px; height: 72px; color: var(--blue); }

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; margin: 0 auto; }
}

/* Marquee -------------------------------------------------------------- */
.marquee {
  background: #b8b4ac;
  color: var(--ink);
  border-top: var(--stroke-w) solid var(--ink);
  border-bottom: var(--stroke-w) solid var(--ink);
  padding: 18px 0;
  overflow: hidden;
  position: relative;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 24s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-item {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 32px;
  white-space: nowrap;
}
.marquee-dot {
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--pink);
  margin-right: 14px;
  vertical-align: middle;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Section headers ------------------------------------------------------ */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.section-label {
  display: inline-block;
  padding: 6px 12px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-label.pink { border-color: var(--pink); }
.section-label.yellow { border-color: var(--yellow); }
.section-label.blue { border-color: var(--blue); }
.section-label.green { border-color: var(--green); }

/* Service cards -------------------------------------------------------- */
.service-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
}
.service-card .icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}
.service-card .icon svg { width: 28px; height: 28px; }
.service-card h3 { font-size: 24px; }
.service-card p { opacity: .9; }

/* Project cards -------------------------------------------------------- */
.project-card {
  position: relative;
  border: var(--stroke-w) solid var(--ink);
  box-shadow: var(--shadow);
  background: #b8b4ac;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.project-card:nth-child(4n+1) { border-color: var(--pink); }
.project-card:nth-child(4n+2) { border-color: var(--blue); }
.project-card:nth-child(4n+3) { border-color: var(--green); }
.project-card:nth-child(4n+4) { border-color: var(--yellow); }
.project-card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px rgba(0,0,0,.5); }
.project-card .thumb {
  aspect-ratio: 4 / 3;
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
.project-card .thumb .pattern {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(244,241,234,.08) 0,
    rgba(244,241,234,.08) 2px,
    transparent 2px,
    transparent 14px
  );
}
.project-card .thumb .year {
  position: absolute;
  top: 16px; left: 16px;
  padding: 6px 10px;
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
.project-card .info { padding: 24px; }
.project-card .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.project-card .tag {
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}
.project-card h3 { font-size: 22px; margin-bottom: 8px; }
.project-card .meta { font-size: 14px; opacity: .7; }

/* About / stats -------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-text { max-width: 640px; }
.about-text p { margin-bottom: 20px; }
.stats-stack { display: flex; flex-direction: column; gap: 24px; }
.stat-card {
  padding: 28px;
}
.stat-card .number {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-card .label { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; opacity: .9; }

/* Testimonial ---------------------------------------------------------- */
.testimonial {
  padding: 48px;
  border: var(--stroke-w) solid var(--blue);
  box-shadow: var(--shadow);
  background: var(--paper);
  color: var(--ink);
  position: relative;
}
.testimonial .quote {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 32px;
}
.testimonial .client {
  display: flex;
  align-items: center;
  gap: 16px;
}
.testimonial .avatar {
  width: 56px; height: 56px;
  border: 3px solid var(--blue);
  box-shadow: var(--shadow-sm);
  background: var(--ink);
  color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 20px;
}

/* CTA band ------------------------------------------------------------- */
.cta-band {
  padding: 80px 0;
}
.cta-box {
  padding: clamp(40px, 6vw, 80px);
  border: var(--stroke-w) solid var(--ink);
  box-shadow: var(--shadow);
  background: var(--yellow);
  color: var(--ink);
  text-align: center;
}
.cta-box h2 { margin-bottom: 20px; }
.cta-box p { max-width: 560px; margin: 0 auto 32px; }

/* Footer --------------------------------------------------------------- */
.site-footer {
  border-top: var(--stroke-w) solid var(--hairline);
  padding: 80px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 64px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { opacity: .8; max-width: 320px; color: var(--gold); }
.footer-col h4 {
  font-size: 14px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { opacity: .8; transition: opacity .15s; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 2px solid var(--hairline);
  font-size: 13px;
  opacity: .6;
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* Page header (first-level) -------------------------------------------- */
.page-header {
  padding: 64px 0 48px;
  border-bottom: var(--stroke-w) solid var(--gold);
  background-color: #16130f;
  background-image:
    radial-gradient(rgba(244,241,234,.08) 1px, transparent 1.5px),
    linear-gradient(120deg, rgba(255,77,157,.20), rgba(255,210,63,.18) 38%, rgba(46,107,255,.20) 70%, rgba(37,201,106,.20));
  background-size: 22px 22px, cover;
  color: var(--paper);
}
.page-header .display-1 { color: var(--gold); }
.page-header .body-lg { opacity: .88; }
.page-header .breadcrumb a { border-bottom-color: var(--gold); }
.page-header .container { display: flex; flex-direction: column; gap: 16px; }

/* Outline title: 每个字一个彩色线描边 */
.outline-char {
  display: inline-block;
  letter-spacing: 0.12em;
  font-weight: 600;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1.5px currentColor;
  text-stroke: 1.5px currentColor;
  paint-order: stroke fill;
}
.outline-char.pink { color: var(--pink); }
.outline-char.yellow { color: var(--yellow); }
.outline-char.blue { color: var(--blue); }
.outline-char.green { color: var(--green); }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.breadcrumb a { border-bottom: 2px solid var(--ink); }
.breadcrumb span { opacity: .6; }

/* Filters -------------------------------------------------------------- */
.filters {
  padding: 32px 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 10px 20px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  border: var(--stroke-w) solid var(--ink);
  box-shadow: var(--shadow-sm);
  background: var(--bg);
  color: var(--paper);
  cursor: pointer;
  transition: all .12s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--pink);
  color: var(--ink);
}

/* Case detail ---------------------------------------------------------- */
.case-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}
.case-cover {
  aspect-ratio: 4 / 3;
  border: var(--stroke-w) solid var(--ink);
  box-shadow: var(--shadow);
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
.case-cover .pattern {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,77,157,.25) 0, transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(46,107,255,.25) 0, transparent 35%),
    repeating-linear-gradient(0deg, rgba(244,241,234,.05) 0, rgba(244,241,234,.05) 2px, transparent 2px, transparent 18px);
}
.case-intro { display: flex; flex-direction: column; gap: 24px; }
.case-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.case-meta-item {
  padding: 18px;
  border: var(--stroke-w) solid var(--ink);
  box-shadow: var(--shadow-sm);
  background: var(--paper);
  color: var(--ink);
}
.case-meta-item:nth-child(1) { border-color: var(--pink); }
.case-meta-item:nth-child(2) { border-color: var(--yellow); }
.case-meta-item:nth-child(3) { border-color: var(--blue); }
.case-meta-item:nth-child(4) { border-color: var(--green); }
.case-meta-item .label { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: .72; }
.case-meta-item .value { font-size: 18px; font-weight: 900; }

.case-body {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 48px;
}
.gallery-main .main-img {
  aspect-ratio: 16 / 10;
  border: var(--stroke-w) solid var(--ink);
  box-shadow: var(--shadow);
  background: var(--bg-2);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-thumbs .thumb {
  aspect-ratio: 4 / 3;
  border: var(--stroke-w) solid var(--ink);
  box-shadow: var(--shadow-sm);
  background: var(--bg-2);
  cursor: pointer;
  transition: transform .12s;
}
.gallery-thumbs .thumb:nth-child(1) { border-color: var(--pink); }
.gallery-thumbs .thumb:nth-child(2) { border-color: var(--yellow); }
.gallery-thumbs .thumb:nth-child(3) { border-color: var(--green); }
.gallery-thumbs .thumb:nth-child(4) { border-color: var(--blue); }
.gallery-thumbs .thumb:hover { transform: translateY(-3px); }

.case-sidebar { display: flex; flex-direction: column; gap: 24px; }
.highlight-list { display: flex; flex-direction: column; gap: 16px; }
.highlight {
  padding: 24px;
}

@media (max-width: 1024px) {
  .case-hero, .case-body { grid-template-columns: 1fr; }
}

/* Reveal animation ----------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Utilities ------------------------------------------------------------ */
.text-white { color: var(--white); }
.text-ink { color: var(--ink); }
.bg-panel { background: var(--bg-2); border: var(--stroke-w) solid var(--hairline); box-shadow: var(--shadow); }
.bg-pink { background: rgba(255,77,157,.12); border: 2px solid var(--pink); }
.bg-yellow { background: rgba(255,210,63,.14); border: 2px solid var(--yellow); }
.bg-blue { background: rgba(46,107,255,.14); border: 2px solid var(--blue); }
.bg-green { background: rgba(37,201,106,.14); border: 2px solid var(--green); }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-16 { margin-bottom: 16px; }

/* Glassmorphism background layer --------------------------------------- */
body { background: none; }
body::before {
  content: '';
  position: fixed;
  inset: -100px;
  z-index: -1;
  background:
    linear-gradient(rgba(24, 22, 19, 0.88), rgba(24, 22, 19, 0.88)),
    url('../assets/background.png') center / cover no-repeat;
  filter: blur(15px);
  -webkit-filter: blur(15px);
}

.site-header {
  background: rgba(24, 22, 19, 0.85);
  backdrop-filter: blur(85px);
  -webkit-backdrop-filter: blur(85px);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.hero-card {
  background: rgba(244, 241, 234, 0.78);
  backdrop-filter: blur(85px);
  -webkit-backdrop-filter: blur(85px);
}

.project-card {
  background: rgba(244, 241, 234, 0.75);
  backdrop-filter: blur(85px);
  -webkit-backdrop-filter: blur(85px);
}

.project-card .thumb {
  background: rgba(33, 30, 25, 0.45);
}

.cta-box {
  background: rgba(255, 210, 63, 0.85);
  backdrop-filter: blur(85px);
  -webkit-backdrop-filter: blur(85px);
}

.filters {
  padding: 24px;
  background: rgba(24, 22, 19, 0.65);
  backdrop-filter: blur(85px);
  -webkit-backdrop-filter: blur(85px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

.page-header {
  background: rgba(24, 22, 19, 0.65);
  backdrop-filter: blur(85px);
  -webkit-backdrop-filter: blur(85px);
  background-image: none;
}

.case-meta-item {
  background: rgba(244, 241, 234, 0.78);
  backdrop-filter: blur(85px);
  -webkit-backdrop-filter: blur(85px);
}

.mobile-menu {
  background: rgba(244, 241, 234, 0.92);
  backdrop-filter: blur(85px);
  -webkit-backdrop-filter: blur(85px);
}

.site-footer {
  background: rgba(24, 22, 19, 0.72);
  backdrop-filter: blur(85px);
  -webkit-backdrop-filter: blur(85px);
}

.stat-card.nb-block-black {
  background: rgba(244, 241, 234, 0.78);
  color: var(--ink);
}

/* Works: sort + pagination -------------------------------------------- */
.sort-field {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sort-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: .72;
  color: var(--paper);
}
.sort-select {
  padding: 10px 14px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  border: 2px solid var(--paper);
  box-shadow: var(--shadow-sm);
  background: var(--ink);
  color: var(--paper);
  border-radius: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.works-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 56px;
}
.page-btn {
  min-width: 44px;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  border: 2px solid var(--paper);
  box-shadow: var(--shadow-sm);
  background: rgba(24, 22, 19, 0.65);
  backdrop-filter: blur(85px);
  -webkit-backdrop-filter: blur(85px);
  color: var(--paper);
  cursor: pointer;
  transition: all .12s;
}
.page-btn:hover:not(:disabled) { background: var(--paper); color: var(--ink); }
.page-btn.active { background: var(--yellow); color: var(--ink); }
.page-btn:disabled { opacity: .38; cursor: not-allowed; }
.page-btn.num { padding: 10px 12px; }
.pager-info {
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: .68;
  color: var(--paper);
}

@media (max-width: 640px) {
  .sort-field { margin-left: 0; width: 100%; justify-content: space-between; }
  .page-btn { min-width: 40px; padding: 9px 12px; font-size: 13px; }
}

/* ============ 作品录入表单 ============ */
.work-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}
.form-card { padding: 28px; }
.form-card-title { margin-bottom: 6px; }
.form-card-desc { margin: 0 0 18px; font-size: 14px; opacity: .72; }

.form-alert {
  padding: 16px 20px;
  border: var(--stroke-w) solid var(--pink);
  background: rgba(244, 241, 234, 0.92);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.6;
}

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.field { display: flex; flex-direction: column; }
.field-full { grid-column: 1 / -1; }
.field-label { margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.field-note { display: block; margin-top: 6px; font-size: 12px; opacity: .62; font-weight: 400; }

.mark {
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  margin-left: 8px;
  border: 2px solid;
  letter-spacing: .04em;
}
.mark.req { color: #C2185B; border-color: #C2185B; }
.mark.opt { color: #6B635A; border-color: rgba(26, 23, 20, .35); }

.input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(26, 23, 20, 0.05);
  border: 2px solid var(--ink);
  border-radius: 0;
  outline: none;
  resize: vertical;
}
.input:focus { border-color: var(--pink); background: #fff; }
.input::placeholder { color: rgba(26, 23, 20, .38); font-weight: 400; }

.check-row { display: flex; flex-wrap: wrap; gap: 10px; }
.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid var(--ink);
  background: rgba(26, 23, 20, 0.04);
  cursor: pointer;
}
.check input { accent-color: var(--pink); width: 16px; height: 16px; }

.field-error { display: none; margin-top: 8px; font-size: 13px; font-weight: 700; color: #C2185B; }
.field-error.show { display: block; }

/* ---- 上传控件 ---- */
.uploader { margin-top: 4px; }
.upload-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 148px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  color: var(--ink);
  border: 2.5px dashed rgba(26, 23, 20, .45);
  background: rgba(26, 23, 20, 0.04);
  transition: all .12s;
}
.upload-drop:hover, .upload-drop:focus-visible { border-color: var(--pink); background: rgba(255, 77, 157, .08); outline: none; }
.uploader.dragging .upload-drop { border-color: var(--blue); background: rgba(46, 107, 255, .1); }
.upload-drop p { margin: 0; font-size: 14px; font-weight: 600; }
.upload-count { font-family: var(--font-mono); font-size: 12px; opacity: .7; }
.upload-hint { margin: 10px 0 0; font-size: 12px; opacity: .66; }

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.thumb-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border: var(--stroke-w) solid var(--ink);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  background: var(--bg-2);
}
.thumb-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb-idx {
  position: absolute; top: 6px; left: 6px;
  padding: 2px 8px;
  background: var(--yellow); color: var(--ink);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
}
.thumb-ops {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; gap: 6px; padding: 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .68));
  opacity: 0; transition: opacity .12s;
}
.thumb-item:hover .thumb-ops, .thumb-item:focus-within .thumb-ops { opacity: 1; }
.thumb-op {
  flex: 1;
  padding: 6px 0;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 900;
  border: 2px solid var(--paper);
  background: rgba(24, 22, 19, .85);
  color: var(--paper);
  cursor: pointer;
}
.thumb-op:hover { background: var(--pink); color: var(--ink); }

.form-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.nb-btn.danger { border-color: var(--pink); background: var(--pink); color: var(--ink); }
.form-tip { margin: 0; font-size: 12px; line-height: 1.7; color: rgba(244, 241, 234, .68); }

/* ---- 详情页 360 全景 ---- */
.case-main-col { display: flex; flex-direction: column; gap: 32px; }
.pano-title { margin-bottom: 16px; }
.pano-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.pano-item {
  aspect-ratio: 2 / 1;
  border: var(--stroke-w) solid var(--ink);
  box-shadow: var(--shadow-sm);
  background: var(--bg-2);
}

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 20px; }
  .thumb-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .thumb-ops { opacity: 1; } /* 触屏无 hover，操作常驻 */
  .case-body { grid-template-columns: 1fr; }
}

/* ============ 图片查看器（效果图灯箱 / 360 全景环视） ============ */
body.zf-locked { overflow: hidden; }

.zf-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: none;
  background: rgba(10, 9, 8, 0.94);
}
.zf-overlay.open { display: block; }

.zf-stage {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 64px 88px;
}
/* object-fit:contain —— 只做等比适配屏幕，不重采样、不重编码，
   源文件仍是 IndexedDB 里的原始字节，不降质 */
.zf-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .18s;
}

.zf-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid rgba(255, 255, 255, 0.35);
  cursor: pointer; z-index: 3;
  transition: all .12s;
}
.zf-arrow:hover { background: rgba(255, 255, 255, 0.3); }
.zf-prev { left: 24px; }
.zf-next { right: 24px; }

.zf-close {
  position: absolute; top: 20px; right: 24px;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid rgba(255, 255, 255, 0.35);
  cursor: pointer; z-index: 4;
}
.zf-close:hover { background: var(--pink); color: var(--ink); }

.zf-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 16px; padding: 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
}
.zf-counter {
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  color: #fff; letter-spacing: .06em;
}
.zf-share {
  padding: 8px 16px;
  font-family: var(--font-display); font-size: 13px; font-weight: 900;
  color: var(--ink); background: var(--yellow);
  border: 2px solid var(--ink); cursor: pointer;
}
.zf-loading {
  position: absolute; font-size: 14px; color: rgba(255, 255, 255, .8);
}

/* ---- 全景环视 ---- */
.zf-pano-stage {
  position: absolute; inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none; /* 关键：关掉浏览器默认滚动/缩放，触摸滑动才能用于环视 */
}
.zf-pano-stage.dragging { cursor: grabbing; }
.zf-pano-img {
  position: absolute; left: 0; top: 0;
  max-width: none; max-height: none; /* 由 JS 按原始比例计算真实尺寸 */
  opacity: 0; transition: opacity .18s;
  will-change: transform;
  user-select: none; -webkit-user-select: none;
}
.zf-pano-tip {
  position: absolute; left: 50%; bottom: 78px; transform: translateX(-50%);
  padding: 8px 16px; font-size: 12px; color: #fff;
  background: rgba(0, 0, 0, .5); border: 1px solid rgba(255, 255, 255, .25);
  pointer-events: none;
}

/* ---- 防下载：CSS 层面 ---- */
.protected-img {
  -webkit-user-select: none; user-select: none;   /* 禁止选中 */
  -webkit-touch-callout: none;                    /* iOS 长按弹出菜单 */
  -webkit-user-drag: none;                        /* Safari 拖拽另存 */
}

/* ---- 提示 ---- */
.zf-toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 10000;
  transform: translateX(-50%) translateY(12px);
  padding: 12px 20px;
  font-size: 14px; font-weight: 700;
  color: var(--ink); background: var(--paper);
  border: 2.5px solid var(--ink); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: all .18s;
}
.zf-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- 背景音乐开关 ---- */
.zf-bgm {
  position: fixed; right: 20px; bottom: 20px; z-index: 9990;
  display: flex; align-items: center; justify-content: center;
  padding: 8px;
  background: var(--paper);
  border: 2.5px solid var(--ink); box-shadow: var(--shadow-sm);
}
.zf-bgm-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 30px; padding: 0 8px;
  font-family: var(--font-display); font-size: 13px; font-weight: 900;
  color: var(--ink); background: transparent;
  border: 2px solid var(--ink);
  cursor: pointer; transition: all .12s;
}
.zf-bgm-btn:hover { background: var(--yellow); }
.zf-bgm.on .zf-bgm-btn { background: var(--yellow); }
.zf-bgm-ico { font-size: 13px; line-height: 1; }

/* 第三方嵌入模式（跨域，只能用对方自带控件） */
.zf-bgm-embed { padding: 0; background: transparent; border: 0; box-shadow: none; }
.zf-bgm-embed .zf-bgm-btn { background: var(--paper); box-shadow: var(--shadow-sm); }
.zf-bgm-frame {
  display: none;
  position: fixed; right: 20px; bottom: 70px; z-index: 9991;
  width: 320px; height: 230px;
  background: var(--paper);
  border: 2.5px solid var(--ink); box-shadow: var(--shadow);
}
.zf-bgm-frame.open { display: block; }
.zf-bgm-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---- 可点击放大 ---- */
.js-img { cursor: zoom-in; }
.pano-item { cursor: zoom-in; }
.pano-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.pano-title { margin-bottom: 0; }

@media (max-width: 720px) {
  .zf-stage { padding: 56px 12px; }
  .zf-arrow { width: 44px; height: 44px; font-size: 26px; }
  .zf-prev { left: 8px; }
  .zf-next { right: 8px; }
  .zf-close { top: 12px; right: 12px; width: 40px; height: 40px; font-size: 26px; }
  .zf-bar { flex-direction: column; gap: 10px; padding: 14px; }
  .zf-bgm { right: 12px; bottom: 12px; padding: 6px; }
  .zf-bgm-frame { right: 12px; bottom: 62px; width: min(320px, calc(100vw - 24px)); height: 200px; }
  .zf-toast { bottom: 76px; font-size: 13px; }
}
