/*
 * Alchemy Technology — Obsidian Editorial System
 * A visual override layer for the existing static site.
 * It intentionally keeps the original semantic HTML and business behaviour.
 */

:root {
  color-scheme: dark;
  --paper: #06080d;
  --paper-soft: #0a0e15;
  --paper-line: rgba(244, 247, 255, 0.11);
  --paper-line-strong: rgba(244, 247, 255, 0.22);
  --ink: #f4f6fb;
  --ink-soft: #c6cad3;
  --ink-mute: #8d949f;
  --ink-faint: #646b76;
  --brand: #4d74ff;
  --brand-deep: #3658d7;
  --brand-soft: rgba(77, 116, 255, 0.12);
  --brand-bright: #7895ff;
  --bg-dark: #06080d;
  --bg-dark-2: #0d121b;
  --ink-on-dark: #f4f6fb;
  --line-on-dark: rgba(244, 247, 255, 0.11);
  --surface: #0c1017;
  --surface-raised: #111720;
  --surface-hover: #141b26;
  --glow: rgba(77, 116, 255, 0.16);
  --max: 1360px;
}

html {
  background: var(--paper);
  scrollbar-color: var(--brand) var(--paper);
}

body,
.toolbox-page,
.project-detail-page {
  background:
    radial-gradient(circle at 86% 8%, rgba(77, 116, 255, 0.07), transparent 28rem),
    var(--paper);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0.13;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0, rgba(255,255,255,.018) 1px, transparent 1px, transparent 3px),
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.04) 0 1px, transparent 1.5px);
  background-size: auto, 13px 17px;
  mix-blend-mode: soft-light;
}

::selection {
  background: var(--brand);
  color: #fff;
}

:focus-visible {
  outline-color: var(--brand-bright) !important;
}

.wrap {
  width: min(var(--max), calc(100% - clamp(40px, 7vw, 112px)));
}

/* Header */
.site-header,
.site-header.scrolled,
.toolbox-header,
.toolbox-header.scrolled,
.nav-open .site-header {
  min-height: 72px;
  padding: 15px clamp(20px, 3.4vw, 52px);
  background: rgba(6, 8, 13, 0.72);
  color: var(--ink);
  border-bottom: 1px solid var(--line-on-dark);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

.brand {
  min-width: 188px;
}

.brand-logo,
.brand-logo-white,
.brand-logo-color {
  filter: none;
}

.brand-logo-color,
.site-header.scrolled .brand-logo-color {
  opacity: 0;
}

.brand-logo-white,
.site-header.scrolled .brand-logo-white {
  opacity: 1;
}

.site-nav {
  counter-reset: nav-item;
  gap: clamp(24px, 3vw, 48px);
}

.site-nav a {
  counter-increment: nav-item;
  color: var(--ink-mute);
  font-size: 14px;
  letter-spacing: .08em;
}

.site-nav a .label::before {
  content: "0" counter(nav-item) " / ";
  color: var(--ink-faint);
  font: 500 9px/1 Consolas, "SFMono-Regular", monospace;
  letter-spacing: .12em;
  vertical-align: .12em;
}

.site-nav a:hover,
.site-nav a.is-active,
.site-header.scrolled .site-nav a.is-active {
  color: var(--ink);
}

.site-nav a::after {
  bottom: -10px;
  height: 1px;
  background: var(--brand);
}

.lang-switch,
.site-header.scrolled .lang-switch,
.nav-open .lang-switch {
  height: 38px;
  border-radius: 2px;
  color: var(--ink-soft);
  background: rgba(255,255,255,.035);
  border-color: var(--paper-line-strong);
}

.lang-switch:hover {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand-soft);
}

/* Hero */
.hero {
  min-height: 100svh;
  height: auto;
  background: #030407;
  isolation: isolate;
  border-bottom: 1px solid var(--line-on-dark);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 25% 25%;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.2), #000 45%, transparent 95%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.2), #000 45%, transparent 95%);
}

.hero-media {
  inset: 0;
  opacity: .62;
  filter: saturate(.78) contrast(1.08);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3,4,7,.96) 0%, rgba(3,4,7,.7) 44%, rgba(3,4,7,.34) 75%, rgba(3,4,7,.62) 100%);
}

.hero-shade {
  z-index: 1;
  background:
    radial-gradient(circle at 76% 46%, transparent 0, rgba(3,4,7,.12) 28%, rgba(3,4,7,.68) 77%),
    linear-gradient(180deg, rgba(3,4,7,.34), rgba(3,4,7,.14) 45%, #030407 100%);
}

.hero-stage {
  z-index: 3;
  flex: none;
  align-self: center;
  width: min(var(--max), calc(100% - clamp(40px, 7vw, 112px)));
  min-height: 100svh;
  margin: 0 auto;
  padding: 132px 0 154px;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
}

.hero-stage::after {
  content: "VOL. MMXXVI\A AI VISUAL SYSTEM";
  white-space: pre;
  position: absolute;
  right: 0;
  bottom: 138px;
  color: var(--ink-mute);
  text-align: right;
  font: 600 10px/1.9 Consolas, "SFMono-Regular", monospace;
  letter-spacing: .24em;
}

.hero-meta {
  justify-content: flex-start;
  margin-bottom: clamp(44px, 7vh, 86px);
  color: var(--ink-mute);
  font: 600 10px/1.4 Consolas, "SFMono-Regular", monospace;
  letter-spacing: .22em;
  text-align: left;
}

.hero-meta-item i {
  width: 7px;
  height: 7px;
  border-radius: 0;
  background: var(--brand);
  box-shadow: 0 0 22px rgba(77,116,255,.75);
  transform: rotate(45deg);
}

.hero-title {
  max-width: 1120px;
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(92px, 14.8vw, 232px);
  line-height: .78;
  letter-spacing: -.085em;
  text-align: left;
  text-wrap: balance;
}

.hero-title .line {
  transform-origin: left center;
  text-shadow: 0 0 60px rgba(77,116,255,.05);
}

.hero-title .line:hover {
  letter-spacing: -.075em;
  transform: translateX(8px);
}

.hero-tagline {
  margin: 20px 0 26px;
  color: var(--brand-bright);
  font-size: clamp(18px, 2vw, 29px);
  font-weight: 700;
  letter-spacing: .28em;
  text-align: left;
}

.hero-sub {
  max-width: 640px;
  margin: 0 0 38px;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.8;
  letter-spacing: .04em;
  text-align: left;
  white-space: normal;
}

.hero-actions {
  justify-content: flex-start;
  gap: 12px;
}

.btn {
  min-height: 50px;
  padding: 15px 24px;
  border-radius: 2px;
  font-size: 14px;
  letter-spacing: .06em;
}

.btn-primary {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.btn-primary:hover {
  background: var(--brand-bright);
  border-color: var(--brand-bright);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--ink);
  background: rgba(255,255,255,.035);
  border-color: var(--paper-line-strong);
}

.btn-ghost:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.5);
  transform: translateY(-2px);
}

.hero-actions .btn-feishu {
  min-width: 270px;
}

.hero .marquee {
  z-index: 4;
  height: 62px;
  padding: 0;
  color: var(--ink-soft);
  background: rgba(6,8,13,.82);
  border-top: 1px solid var(--line-on-dark);
  -webkit-mask-image: none;
  mask-image: none;
  backdrop-filter: blur(12px);
}

.hero .marquee-track {
  min-height: 62px;
}

.hero .marquee-track span {
  font: 700 14px/1 Consolas, "SFMono-Regular", monospace;
  letter-spacing: .12em;
}

.hero .marquee-track span::after {
  content: "◆";
  margin-left: 28px;
  color: var(--brand);
  font-size: 8px;
}

/* Stats */
.stats {
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border-bottom: 1px solid var(--paper-line);
}

.stats-inner {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat,
.stat:first-child {
  min-height: 184px;
  padding: 38px clamp(24px, 4vw, 64px);
  border-left: 1px solid var(--paper-line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat:first-child { border-left: 0; }

.stat-num {
  color: var(--ink);
  font-size: clamp(48px, 5.2vw, 80px);
  line-height: .9;
  letter-spacing: -.06em;
}

.stat-num em {
  color: var(--brand);
  font-size: .34em;
  letter-spacing: 0;
}

.stat-label {
  color: var(--ink-mute);
  font: 500 11px/1.5 Consolas, "SFMono-Regular", monospace;
  letter-spacing: .12em;
}

/* Section shell */
.section,
.works,
.services,
.tools-showcase,
.team,
.contact {
  position: relative;
  padding: clamp(96px, 10vw, 152px) 0;
  color: var(--ink);
  background: var(--paper);
  border-top: 0;
  border-bottom: 1px solid var(--paper-line);
}

.services,
.tools-showcase,
.contact {
  background: var(--paper-soft);
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(20px, 3.5vw, 56px);
  right: clamp(20px, 3.5vw, 56px);
  height: 1px;
  background: linear-gradient(90deg, var(--brand) 0 68px, var(--paper-line) 68px 100%);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  gap: 20px clamp(40px, 8vw, 128px);
  align-items: end;
  margin-bottom: clamp(54px, 7vw, 96px);
}

.section-label {
  grid-column: 1 / -1;
  color: var(--brand-bright);
  font: 600 10px/1.4 Consolas, "SFMono-Regular", monospace;
  letter-spacing: .24em;
}

.section-label i {
  width: 34px;
  background: var(--brand);
}

.section-title {
  max-width: 980px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(54px, 6.5vw, 98px);
  line-height: .98;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.section-desc {
  max-width: 520px;
  margin: 0;
  color: var(--ink-mute);
  font-size: 14px;
  line-height: 1.9;
}

/* Work grid */
.work-filters {
  gap: 0;
  margin-bottom: 0;
  padding-bottom: 34px;
  border-bottom: 0;
}

.chip {
  min-height: 40px;
  padding: 9px 17px;
  color: var(--ink-mute);
  background: transparent;
  border: 1px solid var(--paper-line);
  border-radius: 0;
  margin-right: -1px;
  font: 600 11px/1 Consolas, "SFMono-Regular", monospace;
  letter-spacing: .08em;
}

.chip:hover {
  z-index: 1;
  color: var(--ink);
  border-color: var(--brand);
}

.chip.active {
  z-index: 2;
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--paper-line);
}

.work {
  position: relative;
  grid-column: auto;
  min-width: 0;
  padding: 20px 20px 26px;
  background:
    radial-gradient(420px circle at var(--pointer-x, 50%) var(--pointer-y, 0%), rgba(77,116,255,.08), transparent 45%),
    var(--paper);
  overflow: hidden;
  transition: background-color .35s ease, transform .35s cubic-bezier(.2,.75,.2,1);
}

.work::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 0;
  height: 1px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s cubic-bezier(.2,.75,.2,1);
}

.work:hover {
  z-index: 1;
  background-color: var(--surface-hover);
}

.work:hover::before { transform: scaleX(1); }

.work-media {
  aspect-ratio: 16 / 10;
  background: var(--surface-raised);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 0;
}

.work-media::after {
  background: linear-gradient(180deg, transparent 55%, rgba(3,4,7,.24));
  opacity: 1;
}

.work-media img {
  filter: saturate(.92) contrast(1.03);
  transition: transform .75s cubic-bezier(.2,.75,.2,1), filter .4s ease;
}

.work:hover .work-media img {
  transform: scale(1.035);
  filter: saturate(1.06) contrast(1.04);
}

.work-info { padding: 22px 2px 0; }

.work-tag {
  display: inline-flex;
  padding: 5px 8px;
  color: var(--brand-bright);
  background: var(--brand-soft);
  border-radius: 0;
  font: 600 9px/1.2 Consolas, "SFMono-Regular", monospace;
  letter-spacing: .1em;
}

.work-info h3 {
  margin-top: 14px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.35;
}

.work-info p {
  color: var(--ink-mute);
  font-size: 13px;
  line-height: 1.7;
}

/* Capabilities */
.capability-list {
  border-top-color: var(--paper-line);
}

.cap-row {
  position: relative;
  grid-template-columns: 110px minmax(240px, .85fr) minmax(320px, 1.15fr);
  min-height: 152px;
  padding: 30px 28px;
  border-color: var(--paper-line);
  background:
    radial-gradient(500px circle at var(--pointer-x, 20%) var(--pointer-y, 50%), rgba(77,116,255,.1), transparent 42%),
    transparent;
  overflow: hidden;
}

.cap-row::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--brand);
  transform: scaleY(0);
  transition: transform .35s ease;
}

.cap-row:hover {
  padding-left: 38px;
  color: var(--ink);
  background-color: rgba(255,255,255,.018);
}

.cap-row:hover::after { transform: scaleY(1); }

.cap-no {
  color: var(--brand);
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1;
}

.cap-title h3 {
  color: var(--ink);
  font-size: clamp(22px, 2vw, 30px);
}

.cap-tag {
  color: var(--ink-faint);
  font: 600 9px/1 Consolas, "SFMono-Regular", monospace;
  letter-spacing: .18em;
}

.cap-row p {
  color: var(--ink-mute);
  font-size: 13px;
  line-height: 1.9;
}

/* Tools on home */
.tool-showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--paper-line);
}

.tool-showcase-card {
  position: relative;
  grid-template-columns: minmax(160px, .78fr) minmax(0, 1.22fr);
  min-height: 330px;
  gap: 0;
  padding: 0;
  color: var(--ink);
  background:
    radial-gradient(420px circle at var(--pointer-x, 30%) var(--pointer-y, 20%), rgba(77,116,255,.1), transparent 43%),
    var(--surface);
  border: 0;
  border-radius: 0;
}

.tool-showcase-card:hover {
  transform: none;
  background-color: var(--surface-hover);
}

.tool-showcase-media {
  height: 100%;
  min-height: 330px;
  border-right: 1px solid var(--paper-line);
  border-radius: 0;
}

.tool-showcase-media img {
  height: 100%;
  object-fit: cover;
  filter: saturate(.76) contrast(1.05);
}

.tool-showcase-card:hover .tool-showcase-media img {
  transform: scale(1.035);
  filter: saturate(1) contrast(1.05);
}

.tool-showcase-info {
  padding: clamp(26px, 3vw, 42px);
}

.tool-showcase-info h3 {
  color: var(--ink);
  font-size: clamp(23px, 2vw, 30px);
  line-height: 1.2;
}

.tool-showcase-info p {
  color: var(--ink-mute);
  font-size: 12px;
  line-height: 1.75;
  -webkit-line-clamp: 6;
}

.tool-showcase-bottom { border-color: var(--paper-line); }

.tool-showcase-tags li,
.modal-tool-intro li {
  color: var(--ink-mute);
  background: transparent;
  border: 1px solid var(--paper-line);
  border-radius: 0;
}

.tool-showcase-action,
.tool-modal-download {
  color: var(--brand-bright);
}

/* Team */
.team {
  background:
    radial-gradient(circle at 15% 60%, rgba(77,116,255,.08), transparent 30rem),
    var(--paper);
}

.team-grid {
  grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr);
  gap: clamp(48px, 9vw, 132px);
}

.founder { top: 104px; }

.founder-media {
  background: var(--surface-raised);
  border: 1px solid var(--paper-line);
  border-radius: 0;
}

.founder-media img {
  filter: saturate(.78) contrast(1.05);
  transition: filter .45s ease;
}

.founder:hover .founder-media img { filter: saturate(1) contrast(1.05); }

.founder-info { border-color: var(--paper-line); }
.founder-eyebrow { color: var(--brand-bright); }
.founder-info h3 { color: var(--ink); }
.founder-info p,
.team-copy p { color: var(--ink-mute); }
.team-copy .team-lead { color: var(--ink-soft); }

.chips { border-color: var(--paper-line); }

.chips li,
.team .chips li {
  padding: 9px 12px;
  color: var(--ink-mute);
  background: rgba(255,255,255,.025);
  border: 1px solid var(--paper-line);
  border-radius: 0;
}

/* Contact */
.contact {
  background:
    radial-gradient(circle at 70% 54%, rgba(77,116,255,.12), transparent 30rem),
    var(--paper-soft);
}

.contact-grid { gap: 1px; background: var(--paper-line); border: 1px solid var(--paper-line); }

.contact-card,
.contact-card.alt {
  color: var(--ink);
  background:
    radial-gradient(420px circle at var(--pointer-x, 50%) var(--pointer-y, 20%), rgba(77,116,255,.08), transparent 48%),
    var(--surface);
  border: 0;
  border-radius: 0;
}

.contact-card.alt { background-color: #0a1020; }
.contact-card-head,
.contact-card.alt .contact-card-head { border-color: var(--paper-line); }
.ckh-label,
.contact-card.alt .ckh-label { color: var(--brand-bright); }
.contact-big { color: var(--ink); border-color: var(--paper-line); }
.contact-big:hover { background: rgba(255,255,255,.02); }
.cb-label { color: var(--ink-faint); }
.cb-value { color: var(--ink); }
.contact-big:hover .cb-value { color: var(--brand-bright); }
.contact-wecom-copy small { color: var(--ink-faint); }
.contact-card.alt dt { color: var(--ink-faint); }
.contact-card.alt dd { color: var(--ink-soft); }
.contact-card.alt .btn { color: #fff; background: var(--brand); border-color: var(--brand); }
.wecom-qr-thumb { border-radius: 0; border-color: var(--paper-line-strong); }

/* Footer */
.site-footer,
.toolbox-footer {
  padding-top: clamp(72px, 8vw, 112px);
  color: var(--ink-mute);
  background: #030407;
  border-top: 1px solid var(--paper-line);
}

.foot-brand img { filter: none; opacity: .94; }
.foot-brand p,
.foot-cols a,
.foot-cols span { color: var(--ink-mute); }
.foot-cols a:hover { color: var(--brand-bright); }
.foot-cols h4 { color: var(--ink); }
.footer-base { border-color: var(--paper-line); }

/* Modal surfaces */
.video-modal-backdrop,
.qr-modal-backdrop { background: rgba(1,2,4,.84); backdrop-filter: blur(10px); }

.video-dialog,
.qr-dialog {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--paper-line-strong);
  border-radius: 2px;
  box-shadow: 0 32px 100px rgba(0,0,0,.55);
}

.video-dialog h2,
.qr-dialog h2 { color: var(--ink); }
.qr-dialog p { color: var(--ink-mute); }
.media-tabs { border-color: var(--paper-line); }
.media-tab { color: var(--ink-mute); }
.media-tab:hover { color: var(--ink); background: rgba(255,255,255,.035); }
.media-tab.is-active { color: var(--brand-bright); border-color: var(--brand); }
.project-stage,
.video-stage { background: #020306; border-color: var(--paper-line); }
.video-stage p { color: var(--ink-mute); background: var(--paper-soft); }
.video-stage code { background: var(--surface); border-color: var(--paper-line); }
.video-close { color: var(--ink); background: rgba(255,255,255,.035); border-color: var(--paper-line-strong); border-radius: 2px; }
.video-close:hover { color: #fff; background: var(--brand); border-color: var(--brand); }
.full-video-note,
.modal-tool-intro { color: var(--ink-mute); background: var(--paper-soft); border-color: var(--paper-line); border-radius: 0; }
.wecom-qr-large { border-radius: 0; border-color: var(--paper-line-strong); }

/* Standalone toolbox */
.toolbox-main { padding-top: 72px; }

.toolbox-hero {
  min-height: 58svh;
  display: flex;
  align-items: flex-end;
  padding: clamp(104px, 13vw, 190px) 0 clamp(72px, 9vw, 126px);
  color: var(--ink);
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    radial-gradient(circle at 82% 34%, rgba(77,116,255,.18), transparent 28rem),
    #05070b;
  background-size: 25% 50%, 25% 50%, auto, auto;
  border-bottom: 1px solid var(--paper-line);
}

.toolbox-hero::after {
  right: clamp(24px, 5vw, 72px);
  bottom: clamp(32px, 6vw, 88px);
  width: clamp(100px, 16vw, 230px);
  height: clamp(100px, 16vw, 230px);
  border: 1px solid rgba(77,116,255,.4);
  border-radius: 0;
  transform: rotate(45deg);
  opacity: .4;
}

.toolbox-kicker { color: var(--brand-bright); }

.toolbox-hero h1 {
  max-width: 1000px;
  color: var(--ink);
  font-size: clamp(64px, 9.5vw, 142px);
  line-height: .9;
  letter-spacing: -.065em;
}

.toolbox-hero > .wrap > p:last-child { max-width: 620px; color: var(--ink-mute); }
.toolbox-list-section { padding: clamp(72px, 9vw, 130px) 0; background: var(--paper-soft); }
.toolbox-list { gap: 1px; padding: 1px; background: var(--paper-line); }

.tool-card {
  gap: 0;
  padding: 0;
  color: var(--ink);
  background:
    radial-gradient(520px circle at var(--pointer-x, 30%) var(--pointer-y, 20%), rgba(77,116,255,.1), transparent 42%),
    var(--surface);
  border: 0;
  border-radius: 0;
}

.tool-card:hover { transform: none; background-color: var(--surface-hover); }
.tool-media { min-height: 360px; background: #020306; border-right: 1px solid var(--paper-line); border-radius: 0; }
.tool-card-content { padding: clamp(28px, 4vw, 56px); }
.tool-index { color: var(--brand-bright); }
.tool-card h2 { color: var(--ink); }
.tool-description { color: var(--ink-mute); }
.tool-card-bottom { border-color: var(--paper-line); }
.tool-tags li { color: var(--ink-mute); background: transparent; border-color: var(--paper-line); border-radius: 0; }
.tool-cta { color: var(--brand-bright); }

/* Project detail and 404 */
.detail-header {
  min-height: 72px;
  padding: 13px clamp(20px, 3.4vw, 52px);
  color: var(--ink);
  background: rgba(6,8,13,.82);
  border-color: var(--paper-line);
  backdrop-filter: blur(18px);
}

.detail-brand img { filter: brightness(0) invert(1); }

.detail-back {
  min-height: 40px;
  padding: 0 16px;
  color: var(--ink-soft);
  background: rgba(255,255,255,.035);
  border-color: var(--paper-line-strong);
  border-radius: 2px;
}

.detail-back::before { content: "←  "; color: var(--brand-bright); }
.detail-back:hover { color: #fff; border-color: var(--brand); background: var(--brand-soft); }

.detail-main {
  width: min(1280px, calc(100% - clamp(36px, 7vw, 112px)));
  color: var(--ink);
  background: var(--paper);
  padding-top: clamp(138px, 16vw, 220px);
  padding-bottom: clamp(80px, 10vw, 150px);
}

.detail-intro { max-width: 1100px; }
.detail-kicker { color: var(--brand-bright); }

.detail-title {
  color: var(--ink);
  font-size: clamp(58px, 8vw, 124px);
  line-height: .98;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.detail-media {
  padding: 1px;
  background: var(--paper-line);
  border-radius: 0;
}

.detail-media img,
.detail-video video { border-radius: 0; }
.detail-copy { border-color: var(--paper-line); }
.detail-desc { color: var(--ink-soft); }
.detail-video-note { color: var(--brand-bright); }
.detail-video { color: var(--ink-mute); background: #020306; border-color: var(--paper-line); border-radius: 0; }
.detail-empty { color: var(--ink-mute); background: var(--surface); border-color: var(--paper-line); border-radius: 0; }

.image-preview-backdrop { background: rgba(1,2,4,.92); }
.image-preview-close { color: #fff; background: var(--surface); border-color: var(--paper-line-strong); }

/* Shared motion layer */
.ui-ready .ui-reveal {
  opacity: 0;
  transform: translate3d(0, 34px, 0);
  transition:
    opacity .78s cubic-bezier(.2,.75,.2,1),
    transform .78s cubic-bezier(.2,.75,.2,1);
  transition-delay: var(--ui-delay, 0ms);
}

.ui-ready .ui-reveal.is-ui-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.ui-loaded .hero-meta { animation: alchemyEnter .75s .05s both; }
.ui-loaded .hero-title { animation: alchemyEnter .9s .12s both; }
.ui-loaded .hero-tagline { animation: alchemyEnter .8s .22s both; }
.ui-loaded .hero-sub { animation: alchemyEnter .8s .3s both; }
.ui-loaded .hero-actions { animation: alchemyEnter .8s .38s both; }

@keyframes alchemyEnter {
  from { opacity: 0; transform: translate3d(0, 30px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Tablet */
@media (max-width: 1100px) {
  .hero-title { font-size: clamp(86px, 16vw, 174px); }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work,
  .work.feat { grid-column: auto; }
  .tool-showcase-card { grid-template-columns: 1fr; }
  .tool-showcase-media { min-height: 240px; height: 240px; border-right: 0; border-bottom: 1px solid var(--paper-line); }
  .team-grid { gap: 60px; }
}

/* Mobile navigation and layout */
@media (max-width: 860px) {
  body::before { opacity: .08; }

  .site-header,
  .site-header.scrolled,
  .toolbox-header,
  .toolbox-header.scrolled,
  .nav-open .site-header {
    min-height: 66px;
    padding: calc(11px + env(safe-area-inset-top)) 18px 11px;
    background: #06080d !important;
    border-bottom-color: var(--paper-line) !important;
  }

  .brand { min-width: 0; }

  .site-nav {
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(86vw, 390px);
    padding: calc(96px + env(safe-area-inset-top)) 30px 32px;
    color: var(--ink);
    background:
      radial-gradient(circle at 90% 10%, rgba(77,116,255,.18), transparent 18rem),
      #070a10 !important;
    border-left: 1px solid var(--paper-line) !important;
    box-shadow: -28px 0 80px rgba(0,0,0,.48) !important;
  }

  .site-nav a {
    min-height: 66px;
    color: var(--ink-soft);
    border-bottom-color: var(--paper-line);
    font-size: 22px;
  }

  .site-nav a .label::before { display: inline; margin-right: 10px; }
  .site-nav a:hover,
  .site-nav a.is-active { color: #fff; }

  .nav-toggle { color: var(--ink); }
  .nav-toggle span { background: currentColor; }

  .hero-stage {
    width: calc(100% - 40px);
    min-height: 100svh;
    padding: calc(108px + env(safe-area-inset-top)) 0 124px;
  }

  .hero-stage::after { display: none; }
  .hero-meta { max-width: 310px; margin-bottom: 48px; font-size: 9px; line-height: 1.7; }
  .hero-title { max-width: 100%; font-size: clamp(70px, 20vw, 136px); line-height: .86; }
  .hero-tagline { margin-top: 18px; font-size: 18px; letter-spacing: .18em; }
  .hero-sub { max-width: 510px; font-size: 14px; }
  .hero-media { opacity: .5; }
  .hero-media::after { background: linear-gradient(180deg, rgba(3,4,7,.62), rgba(3,4,7,.5) 48%, #030407 100%); }

  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat,
  .stat:first-child {
    min-height: 152px;
    padding: 28px 20px;
    border-top: 1px solid var(--paper-line);
    border-left: 1px solid var(--paper-line);
  }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(-n+2) { border-top: 0; }

  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .section-label,
  .section-title,
  .section-desc { grid-column: 1; }
  .section-title { font-size: clamp(48px, 10vw, 76px); }
  .section-desc { max-width: 620px; }

  .cap-row {
    grid-template-columns: 78px 1fr;
    gap: 18px;
    padding: 28px 8px;
  }
  .cap-row p { grid-column: 2; }
  .cap-row:hover { padding-left: 8px; }

  .tool-showcase-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .founder { position: relative; top: 0; }
  .contact-grid { grid-template-columns: 1fr; }

  .tool-card { grid-template-columns: 1fr; }
  .tool-media { min-height: 0; border-right: 0; border-bottom: 1px solid var(--paper-line); }

  .project-detail-page { background: var(--paper) !important; }
  .detail-main {
    width: calc(100% - 36px);
    padding-top: 126px;
    background: var(--paper) !important;
  }
  .detail-title-tail,
  .detail-title-phrase { display: inline; white-space: normal; }
}

@media (max-width: 520px) {
  .wrap { width: calc(100% - 36px); }

  .site-header .brand-logo,
  .site-header .brand-logo-white,
  .site-header .brand-logo-color { max-width: 136px; }

  .hero-stage { width: calc(100% - 36px); padding-top: calc(100px + env(safe-area-inset-top)); }
  .hero-title { font-size: clamp(66px, 20.5vw, 102px); letter-spacing: -.08em; }
  .hero-tagline { font-size: 16px; letter-spacing: .15em; }
  .hero-sub { margin-bottom: 30px; line-height: 1.75; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; justify-content: center; padding-inline: 14px; }
  .hero-actions .btn-feishu {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
  }
  .hero .marquee { height: 54px; }
  .hero .marquee-track { min-height: 54px; }

  .stat,
  .stat:first-child { min-height: 136px; padding: 24px 18px; }
  .stat-num { font-size: 46px; }
  .stat-label { font-size: 9px; letter-spacing: .08em; }

  .section,
  .works,
  .services,
  .tools-showcase,
  .team,
  .contact { padding: 82px 0; }

  .section::before { left: 18px; right: 18px; }
  .section-head { margin-bottom: 46px; }
  .section-title { font-size: clamp(44px, 12vw, 62px); }

  .work-filters {
    margin-inline: 0;
    padding-inline: 18px;
    padding-bottom: 28px;
  }

  .chip { flex: 0 0 auto; min-height: 38px; }

  .work-grid {
    width: 100%;
    grid-template-columns: 1fr;
    padding-inline: 1px;
  }

  .work { padding: 16px 16px 24px; }
  .work-media { aspect-ratio: 4 / 3; }
  .work-info h3 { font-size: 20px; }

  .cap-row { grid-template-columns: 64px 1fr; gap: 14px; }
  .cap-no { font-size: 38px; }

  .tool-showcase-media { height: 220px; min-height: 220px; }
  .tool-showcase-info { padding: 26px 22px; }

  .contact-card,
  .contact-card.alt { padding: 28px 20px; }
  .contact-big { grid-template-columns: 1fr; gap: 6px; }
  .contact-big[href^="mailto:"] .cb-value { font-size: 20px; }

  .toolbox-main { padding-top: 66px; }
  .toolbox-hero { min-height: 54svh; padding: 112px 0 72px; }
  .toolbox-hero h1 {
    font-size: clamp(46px, 12.8vw, 52px);
    white-space: nowrap;
  }
  .toolbox-hero::after { opacity: .2; }
  .tool-card-content { padding: 26px 22px; }

  .detail-header { min-height: 66px; padding-inline: 18px; }
  .detail-brand img { width: 132px; }
  .detail-back { min-height: 38px; padding-inline: 12px; font-size: 12px; }
  .detail-main { width: calc(100% - 36px); padding-top: 116px; background: var(--paper) !important; }
  .detail-title { font-size: clamp(46px, 13vw, 68px); }
}

@media (hover: none), (pointer: coarse) {
  .work:hover,
  .tool-card:hover,
  .tool-showcase-card:hover { transform: none; }
  .work:hover .work-media img,
  .tool-showcase-card:hover .tool-showcase-media img { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ui-ready .ui-reveal,
  .ui-ready .ui-reveal.is-ui-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ui-loaded .hero-meta,
  .ui-loaded .hero-title,
  .ui-loaded .hero-tagline,
  .ui-loaded .hero-sub,
  .ui-loaded .hero-actions { animation: none; }
}

/* Refined micro type: retain the technical rhythm without pixel-like density. */
.hero-meta,
.section-label,
.stat-label,
.work-tag,
.cap-tag,
.toolbox-kicker,
.tool-index,
.detail-kicker {
  font-family: var(--font-brand);
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

.hero-meta { font-size: 12px; font-weight: 520; letter-spacing: .16em; }
.section-label { font-size: 11px; letter-spacing: .18em; }
.stat-label { font-size: 12px; letter-spacing: .1em; }
.work-tag,
.cap-tag { font-size: 10px; letter-spacing: .1em; }
.toolbox-kicker,
.tool-index,
.detail-kicker { font-size: 12px; letter-spacing: .12em; }
.site-nav a .label::before { font-family: var(--font-brand); font-size: 10px; }

/* Keep page scrolling, but remove the browser-side scrollbar chrome. */
html,
body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Circular magnetic cursor, adapted from the reference interaction language. */
.alchemy-cursor {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}

.alchemy-cursor.is-visible { opacity: 1; }

.alchemy-cursor-ring,
.alchemy-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  will-change: transform, width, height;
}

.alchemy-cursor-ring {
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 1px solid rgba(122, 152, 255, .82);
  background: rgba(77, 116, 255, .025);
  box-shadow: 0 0 22px rgba(77, 116, 255, .12);
  transition:
    width .22s cubic-bezier(.2, .8, .2, 1),
    height .22s cubic-bezier(.2, .8, .2, 1),
    margin .22s cubic-bezier(.2, .8, .2, 1),
    border-color .22s ease,
    background-color .22s ease,
    box-shadow .22s ease;
}

.alchemy-cursor-dot {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  background: #6f91ff;
  box-shadow: 0 0 12px rgba(111, 145, 255, .9);
}

.alchemy-cursor.is-magnetic .alchemy-cursor-ring {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-color: rgba(137, 164, 255, .95);
  background: rgba(77, 116, 255, .1);
  box-shadow: 0 0 34px rgba(77, 116, 255, .22);
}

.alchemy-cursor.is-pressed .alchemy-cursor-ring {
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  background: rgba(77, 116, 255, .18);
}

@media (hover: hover) and (pointer: fine) {
  .has-alchemy-cursor,
  .has-alchemy-cursor * { cursor: none !important; }
}

/* Homepage tool showcase: lock the original site's layout and proportions. */
.tools-showcase .section-head { max-width: 1180px; }

.tool-showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 1180px;
  padding: 0;
  background: transparent;
}

.tool-showcase-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
  height: 308px;
  min-height: 0;
  min-width: 0;
  padding: 28px;
  color: var(--ink);
  background:
    radial-gradient(circle at var(--pointer-x, 85%) var(--pointer-y, 15%), rgba(77,116,255,.09), transparent 260px),
    var(--surface);
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .22s ease, box-shadow .22s ease, background-color .22s ease;
}

.tool-showcase-card:hover {
  transform: none;
  border-color: rgba(111,145,255,.42);
  background-color: var(--surface-hover);
  box-shadow: 0 18px 42px rgba(0,0,0,.24);
}

.tool-showcase-media {
  position: relative;
  align-self: center;
  overflow: hidden;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 8 / 5;
  background: var(--bg-dark);
  border: 0;
  border-radius: 4px;
}

.tool-showcase-media::after { display: none; }

.tool-showcase-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.76) contrast(1.05);
}

.tool-showcase-card:hover .tool-showcase-media img {
  transform: scale(1.035);
  filter: saturate(1) contrast(1.05);
}

.tool-showcase-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0 2px;
}

.tool-showcase-info h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(25px, 2.3vw, 34px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

.tool-showcase-info p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  color: var(--ink-mute);
  font-size: 15px;
  line-height: 1.75;
}

.tool-showcase-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: auto;
  padding-top: 22px;
  border: 0;
}

.tool-showcase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-showcase-tags li {
  padding: 7px 10px;
  color: #8da5ff;
  background: rgba(77,116,255,.1);
  border: 0;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
}

.tool-showcase-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: #8da5ff;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.tool-showcase-action.is-disabled {
  color: var(--ink-mute);
  cursor: default;
}

.tool-showcase-action.is-disabled:hover {
  color: var(--ink-mute);
}

@media (max-width: 860px) and (min-width: 761px) {
  .tool-showcase-card {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    height: 208px;
    padding: 22px;
  }

  .tool-showcase-info h3 { font-size: 24px; }
  .tool-showcase-info p { -webkit-line-clamp: 2; font-size: 14px; }
  .tool-showcase-bottom { align-items: center; flex-direction: row; gap: 12px; padding-top: 10px; }
}

@media (max-width: 760px) {
  .tool-showcase-card {
    grid-template-columns: 1fr;
    gap: 20px;
    height: auto;
    padding: 16px;
  }

  .tool-showcase-media { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .tool-showcase-info { padding: 0 2px; }
  .tool-showcase-info p { -webkit-line-clamp: 4; }
  .tool-showcase-bottom { align-items: center; flex-direction: row; }
}

@media (max-width: 520px) {
  .hero-meta { font-size: 11px; letter-spacing: .13em; }
  .stat-label { font-size: 11px; }
  .tool-showcase-grid { gap: 16px; }
  .tool-showcase-card { gap: 18px; padding: 14px; }
  .tool-showcase-media { height: auto; min-height: 0; }
  .tool-showcase-info { padding: 0 2px 2px; }
  .tool-showcase-info h3 { font-size: 23px; }
  .tool-showcase-bottom { align-items: flex-start; flex-direction: column; gap: 8px; padding-top: 18px; }
}

/* Restore the original site's section-title composition across the homepage. */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 22px;
  margin-bottom: clamp(56px, 6vw, 88px);
  max-width: 100%;
}

.section-label,
.section-title,
.section-desc { grid-column: auto; }

.section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: clamp(16px, 2.4vw, 36px);
  max-width: 1100px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 5.4vw, 72px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.01em;
  text-wrap: wrap;
}

.section-title .title-sub {
  max-width: 540px;
  color: var(--ink-faint);
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .04em;
}

.section-desc {
  max-width: 760px;
  margin: 0;
  color: var(--ink-mute);
  font-size: 16px;
  line-height: 1.75;
}

@media (min-width: 861px) {
  .section-title { flex-wrap: nowrap; white-space: nowrap; }
}

/* Restore the reference marquee's feathered edges and more legible type. */
.hero .marquee {
  height: auto;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 11%, #000 89%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 11%, #000 89%, transparent 100%);
}

.hero .marquee-track {
  min-height: 0;
  padding: clamp(30px, 2.05vw, 40px) 0;
}

.hero .marquee-track span {
  font-family: var(--font-brand);
  font-size: clamp(18px, 1vw, 22px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .06em;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.hero .marquee-track span::after {
  display: none;
  content: none;
  margin: 0;
}

@media (max-width: 860px) {
  .section-head { gap: 16px; }
  .section-title {
    flex-wrap: wrap;
    white-space: normal;
    font-size: clamp(34px, 8vw, 48px);
  }

  .hero .marquee-track { padding: 22px 0 20px; }
  .hero .marquee-track span { font-size: 17px; }
}

@media (max-width: 520px) {
  .section-head { gap: 10px; margin-bottom: 30px; }
  .section-label { gap: 8px; font-size: 10px; letter-spacing: .14em; }
  .section-label i { width: 20px; }
  .section-title { font-size: clamp(28px, 8vw, 32px); line-height: 1.18; }
  .team .section-title,
  .contact .section-title { font-size: 28px; }
  .section-desc { font-size: 14px; line-height: 1.7; }
  .hero .marquee-track span { font-size: 16px; }
}

/* Only the homepage hero state blends into the background. */
body:not([class]):not(.nav-open) > .site-header:not(.scrolled) {
  background: transparent !important;
  border-bottom-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Navigation labels stay typographic and unnumbered on every page. */
.site-nav { counter-reset: none; }
.site-nav a { counter-increment: none; }
.site-nav a .label::before {
  display: none !important;
  content: none !important;
  margin: 0 !important;
}

/* Remove the decorative technical stamp requested from the hero. */
.hero-stage::after {
  display: none !important;
  content: none !important;
}

/* Stats: cursor-aware glow, eased scale and an in-card blue indicator. */
.stats { overflow: hidden; }

.stat,
.stat:first-child {
  position: relative;
  z-index: 0;
  overflow: hidden;
  isolation: isolate;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center;
  background:
    radial-gradient(360px circle at var(--pointer-x, 50%) var(--pointer-y, 50%), rgba(77,116,255,.11), transparent 48%),
    transparent;
  transition:
    transform .58s cubic-bezier(.22, 1, .36, 1),
    background-color .5s cubic-bezier(.22, 1, .36, 1),
    box-shadow .58s cubic-bezier(.22, 1, .36, 1),
    border-color .5s ease;
}

.stat::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: clamp(18px, 4vw, 64px);
  bottom: 0;
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-bright));
  box-shadow: 0 0 18px rgba(77,116,255,.38);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition:
    transform .62s cubic-bezier(.16, 1, .3, 1),
    opacity .34s ease;
}

.stat:hover {
  z-index: 2;
  transform: translate3d(0, -3px, 0) scale(1.014);
  background-color: rgba(255,255,255,.018);
  box-shadow: 0 16px 44px rgba(0,0,0,.2);
  border-color: rgba(111,145,255,.28);
}

.stat:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Capabilities: transform-based interaction avoids padding/layout jumps. */
.cap-row {
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center;
  transition:
    transform .62s cubic-bezier(.22, 1, .36, 1),
    background-color .52s cubic-bezier(.22, 1, .36, 1),
    box-shadow .62s cubic-bezier(.22, 1, .36, 1),
    border-color .42s ease;
}

.cap-row > * {
  transition: transform .62s cubic-bezier(.22, 1, .36, 1);
}

.cap-row::after {
  opacity: 0;
  transform: scaleY(0);
  transform-origin: center;
  transition:
    transform .62s cubic-bezier(.16, 1, .3, 1),
    opacity .36s ease;
}

.cap-row:hover {
  padding-left: 28px;
  padding-right: 28px;
  transform: translate3d(0, -2px, 0) scale(1.006);
  background-color: rgba(255,255,255,.022);
  box-shadow: 0 18px 50px rgba(0,0,0,.16);
  border-color: rgba(111,145,255,.22);
}

.cap-row:hover > * { transform: translate3d(8px, 0, 0); }
.cap-row:hover::after { opacity: 1; transform: scaleY(1); }

/* Preserve reveal behavior without letting it override capability hover transforms. */
.ui-ready .cap-row.ui-reveal.is-ui-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    opacity .62s cubic-bezier(.22, 1, .36, 1),
    transform .62s cubic-bezier(.22, 1, .36, 1),
    background-color .52s cubic-bezier(.22, 1, .36, 1),
    box-shadow .62s cubic-bezier(.22, 1, .36, 1),
    border-color .42s ease;
  transition-delay: 0s;
}

.ui-ready .cap-row.ui-reveal.is-ui-visible:hover {
  transform: translate3d(0, -2px, 0) scale(1.006);
}

@media (max-width: 860px) {
  .cap-row:hover {
    padding-left: 8px;
    padding-right: 8px;
    transform: none;
  }
  .ui-ready .cap-row.ui-reveal.is-ui-visible:hover { transform: none; }
  .cap-row:hover > * { transform: none; }
}

@media (hover: none), (pointer: coarse) {
  .stat:hover,
  .cap-row:hover {
    transform: none;
    box-shadow: none;
  }

  .stat:hover::after,
  .cap-row:hover::after { opacity: 0; transform: scale(0); }
}

@media (prefers-reduced-motion: reduce) {
  .stat,
  .stat::after,
  .cap-row,
  .cap-row::after,
  .cap-row > * { transition: none !important; }
}

/* The works boundary stays neutral; blue is reserved for the hovered stat card. */
.works::before {
  background: var(--paper-line);
}

/* Restore the original rounded filter-button language with clearer typography. */
.work-filters {
  gap: 8px;
}

.chip {
  min-height: 42px;
  margin-right: 0;
  padding: 10px 20px;
  color: var(--ink-soft);
  background: rgba(255,255,255,.018);
  border: 1px solid var(--paper-line-strong);
  border-radius: 999px;
  font-family: var(--font-brand);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  transition:
    color .24s ease,
    background-color .24s ease,
    border-color .24s ease,
    transform .32s cubic-bezier(.22, 1, .36, 1),
    box-shadow .32s ease;
}

.chip:hover {
  z-index: 1;
  color: #fff;
  background: rgba(255,255,255,.045);
  border-color: rgba(111,145,255,.65);
  transform: translate3d(0, -1px, 0);
  box-shadow: 0 8px 20px rgba(0,0,0,.14);
}

.chip.active {
  z-index: 2;
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(77,116,255,.18);
}

/* Interior navigation remains frosted at every responsive breakpoint. */
.toolbox-page > .site-header,
.toolbox-page > .site-header.scrolled,
.toolbox-page.nav-open > .site-header {
  background: rgba(6,8,13,.76) !important;
  border-bottom-color: var(--line-on-dark) !important;
  box-shadow: 0 12px 36px rgba(0,0,0,.12);
  backdrop-filter: blur(18px) saturate(1.1) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.1) !important;
}

.project-detail-page > .detail-header {
  background: rgba(6,8,13,.82);
  border-color: var(--paper-line);
  box-shadow: 0 12px 36px rgba(0,0,0,.12);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

@media (max-width: 520px) {
  .chip {
    min-height: 40px;
    padding: 9px 17px;
    font-size: 13px;
  }
}

/* Tool showcase cards receive the same eased, transform-based interaction. */
.tool-showcase-card {
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center;
  transition:
    transform .58s cubic-bezier(.22, 1, .36, 1),
    border-color .36s ease,
    box-shadow .58s cubic-bezier(.22, 1, .36, 1),
    background-color .44s ease;
}

.tool-showcase-card:hover {
  transform: translate3d(0, -3px, 0) scale(1.008);
  border-color: rgba(111,145,255,.46);
  box-shadow: 0 22px 52px rgba(0,0,0,.26);
}

.ui-ready .tool-showcase-card.ui-reveal.is-ui-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    opacity .58s cubic-bezier(.22, 1, .36, 1),
    transform .58s cubic-bezier(.22, 1, .36, 1),
    border-color .36s ease,
    box-shadow .58s cubic-bezier(.22, 1, .36, 1),
    background-color .44s ease;
  transition-delay: 0s;
}

.ui-ready .tool-showcase-card.ui-reveal.is-ui-visible:hover {
  transform: translate3d(0, -3px, 0) scale(1.008);
}

/*
 * Keep the team light field on its own blurred layer. Drawing the radial
 * gradient directly on .team-copy clipped it to the copy's rectangular box
 * whenever the pointer approached an edge.
 */
.team-copy {
  position: relative;
  isolation: isolate;
  background: transparent;
}

.team-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      620px circle at var(--pointer-x, 50%) var(--pointer-y, 42%),
      rgba(77,116,255,.20) 0%,
      rgba(77,116,255,.105) 28%,
      rgba(77,116,255,.045) 50%,
      rgba(77,116,255,.012) 67%,
      transparent 82%
    );
  filter: blur(38px);
  opacity: .9;
  transform: translateZ(0);
  transition: opacity .5s cubic-bezier(.22, 1, .36, 1);
}

.team-copy > * {
  position: relative;
  z-index: 1;
}

.team-copy:hover::before { opacity: 1; }

/* Scrolled homepage sections and interior pages use the same visible glass shell. */
body:not([class]) > .site-header.scrolled,
body:not([class]).nav-open > .site-header,
.toolbox-page > .site-header,
.toolbox-page > .site-header.scrolled,
.toolbox-page.nav-open > .site-header {
  background:
    linear-gradient(180deg, rgba(28,35,51,.82), rgba(9,13,22,.72)) !important;
  border-bottom-color: rgba(153,174,220,.18) !important;
  box-shadow:
    0 16px 48px rgba(0,0,0,.3),
    inset 0 1px 0 rgba(255,255,255,.055),
    inset 0 -1px 0 rgba(255,255,255,.035);
  backdrop-filter: blur(26px) saturate(1.24) !important;
  -webkit-backdrop-filter: blur(26px) saturate(1.24) !important;
}

.project-detail-page > .detail-header {
  background:
    linear-gradient(180deg, rgba(20,25,37,.84), rgba(7,10,16,.74));
  border-color: rgba(255,255,255,.13);
  box-shadow:
    0 14px 44px rgba(0,0,0,.24),
    inset 0 -1px 0 rgba(255,255,255,.035);
  backdrop-filter: blur(24px) saturate(1.18);
  -webkit-backdrop-filter: blur(24px) saturate(1.18);
}

/* Keep the floating contact card faithful to the original light treatment. */
.consult-panel {
  color: #0d1933;
  background: rgba(255,255,255,.985);
  border-color: #c5cfdc;
  box-shadow:
    0 24px 70px rgba(3,8,20,.3),
    0 5px 18px rgba(3,8,20,.16);
}

.consult-panel::after {
  background: #fff;
  border-right-color: #c5cfdc;
  border-bottom-color: #c5cfdc;
}

.consult-panel-mark {
  color: #315fd6;
  background: #f1f5fb;
}

.consult-panel-copy strong,
.consult-details > strong {
  color: #0d1933;
}

.consult-panel-copy span,
.consult-details > p {
  color: #667288;
}

.consult-close {
  color: #263650;
}

.consult-close:hover {
  color: #0d1933;
  background: #f1f5fb;
}

.consult-panel-body {
  border-top-color: #dce4ef;
}

.consult-qr {
  border-color: #1689e8;
}

@media (hover: none), (pointer: coarse) {
  .tool-showcase-card:hover,
  .ui-ready .tool-showcase-card.ui-reveal.is-ui-visible:hover {
    transform: none;
    box-shadow: none;
  }

  .team-copy::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tool-showcase-card,
  .ui-ready .tool-showcase-card.ui-reveal.is-ui-visible,
  .team-copy::before { transition: none !important; }
}

/*
 * Shared cursor light field. The brighter core follows the pointer while a
 * long transparent falloff keeps the interaction soft at component edges.
 */
.has-interactive-glow {
  --interactive-glow-size: 430px;
  position: relative;
  isolation: isolate;
}

.interactive-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    var(--interactive-glow-size) circle at var(--pointer-x, 50%) var(--pointer-y, 50%),
    rgba(91,128,255,.30) 0%,
    rgba(77,116,255,.18) 22%,
    rgba(63,96,218,.085) 45%,
    rgba(53,82,180,.028) 62%,
    transparent 76%
  );
  mix-blend-mode: screen;
  transition: opacity .34s cubic-bezier(.22, 1, .36, 1);
  will-change: opacity, background-position;
}

.has-interactive-glow:hover > .interactive-glow,
.has-interactive-glow:focus-within > .interactive-glow {
  opacity: 1;
}

.has-interactive-glow:not(.team-copy):hover {
  outline: 1px solid rgba(112,146,255,.34);
  outline-offset: -1px;
}

.stat { --interactive-glow-size: 360px; }
.work { --interactive-glow-size: 440px; }
.cap-row { --interactive-glow-size: 520px; }
.tool-showcase-card { --interactive-glow-size: 500px; }
.tool-card { --interactive-glow-size: 560px; }
.contact-card { --interactive-glow-size: 520px; }
[data-detail-reveal] { --interactive-glow-size: 640px; overflow: clip; }

/* Keep important card accents and controls above the light wash. */
.stat::after,
.work::before,
.cap-row::after { z-index: 2; }

@media (hover: none), (pointer: coarse) {
  .interactive-glow { display: none; }
  .has-interactive-glow:not(.team-copy):hover { outline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .interactive-glow { transition: none !important; }
}

/* New Xinpianchang highlight archive */
.xpc-works {
  background: var(--paper);
  border-top: 1px solid var(--paper-line);
}
.xpc-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--paper-line);
}
.xpc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 20px;
}
.xpc-card {
  min-width: 0;
  border: 1px solid var(--paper-line);
  background: rgba(255,255,255,.018);
  transition: transform .28s ease, border-color .28s ease, background .28s ease;
}
.xpc-card.is-hidden { display: none; }
.xpc-card:hover {
  transform: translateY(-4px);
  border-color: rgba(111,145,255,.62);
  background: rgba(255,255,255,.04);
}
.xpc-card-link { display: block; color: inherit; text-decoration: none; }
.xpc-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-soft);
}
.xpc-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2,.7,.2,1);
}
.xpc-card:hover .xpc-card-media img { transform: scale(1.045); }
.xpc-card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  background: rgba(6,8,13,.7);
  color: #fff;
  font-size: 16px;
}
.xpc-card-info { padding: 16px 16px 18px; }
.xpc-card-tag {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}
.xpc-card-info h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.xpc-card-info p {
  margin: 11px 0 0;
  color: var(--ink-mute);
  font-size: 12px;
  line-height: 1.5;
}
@media (max-width: 1100px) {
  .xpc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .xpc-filters {
    flex-wrap: nowrap;
    margin-bottom: 26px;
    padding-bottom: 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .xpc-filters::-webkit-scrollbar { display: none; }
  .xpc-filters .chip { flex: 0 0 auto; }
  .xpc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
  .xpc-card-info { padding: 11px 10px 13px; }
  .xpc-card-tag { margin-bottom: 5px; font-size: 8px; }
  .xpc-card-info h3 { min-height: 42px; font-size: 13px; line-height: 1.42; }
  .xpc-card-info p { margin-top: 7px; font-size: 10px; }
  .xpc-card-play { right: 8px; bottom: 8px; width: 28px; height: 28px; font-size: 14px; }
}

/* Empty grid slots use the same dark surface as the page. */
.work-grid { background: var(--paper); }

/* First-frame covers retain their source proportions inside the existing card frame. */
.work-video-cover .work-media {
  background: var(--paper);
}
.work-video-cover .work-media img,
.work-video-cover:hover .work-media img {
  object-fit: contain;
  transform: none;
  filter: none;
}
.work-video-cover .work-media::after { display: none; }
.work-more { display: flex; justify-content: center; padding-block: 28px 0; }
.work-more[hidden] { display: none; }
