/* ==========================================================================
   Self-hosted subset fonts (Noto Serif SC 700 / Noto Sans SC 400+700)
   ========================================================================== */

@font-face {
  font-family: 'Weixu Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/weixu-serif-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Weixu Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/weixu-sans-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Weixu Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/weixu-sans-700.woff2') format('woff2');
}

/* ==========================================================================
   WEIXU INTELLIGENCE — 维序智能
   Editorial system: 秩序. Ink, bone, a vermilion rule.
   ========================================================================== */

:root {
  --ink: #0b0d0b;
  --ink-2: #161916;
  --bone: #f3f0e7;
  --bone-2: #e8e3d4;
  --accent: #ff4a17;
  --accent-2: #ff6d42;
  --ash: #6a6d66;

  --on-ink: rgba(243, 240, 231, 0.94);
  --on-ink-dim: rgba(243, 240, 231, 0.58);
  --on-ink-line: rgba(243, 240, 231, 0.14);
  --on-bone-dim: rgba(11, 13, 11, 0.58);
  --on-bone-line: rgba(11, 13, 11, 0.13);

  --sans: "Weixu Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Weixu Serif", "Noto Serif SC", "Songti SC", "STSong", "Source Han Serif SC",
    "Times New Roman", Georgia, serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --pad: clamp(18px, 4.4vw, 72px);
  --max: 1360px;
  --sec: clamp(68px, 10vw, 160px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

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

body.is-locked { overflow: hidden; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, blockquote, figure { margin: 0; }
table { border-collapse: collapse; }

::selection { background: var(--accent); color: var(--bone); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 400;
}

.dim { color: var(--on-ink-dim); }

.skip {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bone);
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip:focus-visible { transform: none; }

/* ---------- scroll progress ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 120;
  pointer-events: none;
}
.progress i {
  display: block;
  height: 100%;
  width: calc(var(--p, 0) * 100%);
  background: var(--accent);
  transform-origin: 0 50%;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  color: var(--on-ink);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(11, 13, 11, 0.88);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border-bottom-color: var(--on-ink-line);
}
.nav.is-light { color: var(--ink); background: rgba(243, 240, 231, 0.9); }
.nav.is-light.is-stuck { border-bottom-color: var(--on-bone-line); }

.nav-inner {
  height: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-mark .brand-cell { fill: var(--accent); }
.brand-type { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-type b { font-size: 15px; font-weight: 500; letter-spacing: 0.08em; }
.brand-type small {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  opacity: 0.55;
  margin-top: 3px;
}

.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 32px); }
.nav-links a {
  position: relative;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 8px 0;
  opacity: 0.82;
  transition: opacity 0.25s var(--ease);
}
.nav-links a i {
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
  opacity: 0.42;
  margin-right: 6px;
  vertical-align: 1px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.4s var(--ease-out);
}
.nav-links a:hover { opacity: 1; }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }

.nav-act { display: flex; align-items: center; gap: 12px; flex: none; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  min-height: 44px;
  font-size: 13px;
  letter-spacing: 0.03em;
  border-radius: 0;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn span { transition: transform 0.35s var(--ease-out); }
.btn:hover span { transform: translate(2px, -2px); }
.btn-solid { background: var(--accent); color: #140804; font-weight: 500; }
.btn-solid:hover { background: var(--accent-2); }
.btn-outline { border: 1px solid currentColor; }
.nav.is-light .btn-outline:hover { background: var(--ink); color: var(--bone); }
.nav.is-stuck:not(.is-light) .btn-outline:hover { background: var(--bone); color: var(--ink); }
.btn-lg { padding: 16px 24px; font-size: 14px; }
.btn-block { width: 100%; justify-content: space-between; }

.menu-btn {
  display: none;
  width: 44px; height: 44px;
  position: relative;
  border: 1px solid currentColor;
  opacity: 0.75;
}
.menu-btn span {
  position: absolute;
  left: 12px; right: 12px;
  height: 1px;
  background: currentColor;
  transition: transform 0.35s var(--ease-out), opacity 0.2s;
}
.menu-btn span:first-child { top: 18px; }
.menu-btn span:last-child { bottom: 18px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- mobile nav ---------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: var(--ink);
  color: var(--on-ink);
  padding: calc(var(--nav-h) + 20px) var(--pad) calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
  overflow-y: auto;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; }
.mobile-nav nav { display: flex; flex-direction: column; }
.mobile-nav nav a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 18px 0;
  min-height: 56px;
  border-bottom: 1px solid var(--on-ink-line);
  font-family: var(--serif);
  font-size: clamp(24px, 7vw, 32px);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease-out);
}
.mobile-nav nav a i { font-family: var(--mono); font-size: 10px; font-style: normal; opacity: 0.5; }
.mobile-nav.is-open nav a { opacity: 1; transform: none; }
.mobile-nav.is-open nav a:nth-child(1) { transition-delay: 0.05s; }
.mobile-nav.is-open nav a:nth-child(2) { transition-delay: 0.09s; }
.mobile-nav.is-open nav a:nth-child(3) { transition-delay: 0.13s; }
.mobile-nav.is-open nav a:nth-child(4) { transition-delay: 0.17s; }
.mobile-nav.is-open nav a:nth-child(5) { transition-delay: 0.21s; }
.mobile-nav.is-open nav a:nth-child(6) { transition-delay: 0.25s; }
.mobile-foot { display: flex; flex-direction: column; gap: 16px; padding-top: 28px; }
.mobile-foot .mono { color: var(--on-ink-dim); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--on-ink);
  padding-top: calc(var(--nav-h) + clamp(36px, 6vh, 88px));
  padding-bottom: clamp(24px, 3.6vw, 44px);
  overflow: hidden;
  isolation: isolate;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  z-index: 2;
  pointer-events: none;
}
#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0.9;
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(110% 80% at 16% 10%, rgba(11, 13, 11, 0.88) 0%, rgba(11, 13, 11, 0.28) 48%, rgba(11, 13, 11, 0.92) 100%),
    linear-gradient(180deg, rgba(11, 13, 11, 0.5) 0%, rgba(11, 13, 11, 0) 32%, rgba(11, 13, 11, 0.82) 100%);
  pointer-events: none;
}

.hero-grid {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: end;
  min-height: clamp(400px, 56vh, 600px);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-ink-dim);
}
.kicker .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  flex: none;
  animation: dotPulse 3.2s var(--ease) infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 74, 23, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(255, 74, 23, 0); }
}

.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(36px, 7.2vw, 96px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: clamp(18px, 3vw, 36px) 0 clamp(16px, 2.4vw, 28px);
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero-title .line > span {
  display: block;
  transform: translateY(105%);
  animation: lineUp 0.9s var(--ease-out) forwards;
}
.hero-title .line:nth-child(2) > span { animation-delay: 0.1s; }
.hero-title em {
  font-style: normal;
  color: var(--accent);
}
@keyframes lineUp { to { transform: none; } }

.lede {
  max-width: 38em;
  text-wrap: pretty;
  font-size: clamp(14px, 1.2vw, 16.5px);
  line-height: 1.9;
  color: var(--on-ink-dim);
}

.hero-act {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 28px);
  flex-wrap: wrap;
  margin-top: clamp(22px, 3vw, 36px);
}

.link-u {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding-bottom: 4px;
  color: inherit;
}
.link-u::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
  transform-origin: 0 50%;
  transition: opacity 0.3s, transform 0.4s var(--ease-out);
}
.link-u:hover::after { opacity: 1; }

.hero-side { display: flex; flex-direction: column; gap: clamp(18px, 2.2vw, 28px); padding-bottom: 4px; }
.live { border-top: 1px solid var(--on-ink-line); padding-top: 16px; }
.live .tag { color: var(--accent); letter-spacing: 0.2em; }
.live-main {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0 4px;
  font-size: 15px;
}
.live-main .pulse {
  width: 7px; height: 7px;
  background: #6be08f;
  box-shadow: 0 0 0 0 rgba(107, 224, 143, 0.5);
  animation: livePulse 2.4s ease-out infinite;
  flex: none;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(107, 224, 143, 0.45); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(107, 224, 143, 0); }
}
#liveAgents, #liveCalls { font-variant-numeric: tabular-nums; }

.hero-index { border-top: 1px solid var(--on-ink-line); }
.hero-index li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--on-ink-line);
  font-size: 13px;
}
.hero-index i { font-family: var(--mono); font-style: normal; font-size: 10px; opacity: 0.45; }
.hero-index small { margin-left: auto; font-family: var(--mono); font-size: 9px; opacity: 0.38; letter-spacing: 0.06em; }
.coord { color: var(--on-ink-dim); line-height: 1.9; letter-spacing: 0.1em; }

.stats {
  max-width: var(--max);
  margin: clamp(36px, 5.4vw, 72px) auto 0;
  padding: clamp(20px, 2.4vw, 28px) var(--pad) 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--on-ink-line);
}
.stats > div {
  min-width: 0;
  padding-right: clamp(10px, 1.8vw, 24px);
  border-right: 1px solid var(--on-ink-line);
}
.stats > div:last-child { border-right: 0; padding-right: 0; }
.stats > div + div { padding-left: clamp(10px, 1.8vw, 24px); }
.stats dt { font-family: var(--mono); font-size: 10px; letter-spacing: 0.13em; color: var(--on-ink-dim); }
.stats dd {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 10px 0 6px;
  font-family: var(--serif);
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.stats dd i { font-style: normal; font-size: 0.4em; opacity: 0.55; font-family: var(--sans); }
.stats small { display: block; font-size: 11px; line-height: 1.5; color: var(--on-ink-dim); }

/* ---------- clients marquee ---------- */
.clients {
  background: var(--ink);
  color: var(--on-ink);
  padding: clamp(22px, 2.8vw, 36px) 0 clamp(32px, 4vw, 52px);
  border-top: 1px solid var(--on-ink-line);
}
.clients-label {
  text-align: center;
  color: var(--on-ink-dim);
  letter-spacing: 0.14em;
  margin-bottom: 20px;
  padding-inline: var(--pad);
  font-size: 10px;
  line-height: 1.7;
}
.marquee {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: clamp(28px, 5vw, 72px);
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--serif);
  font-size: clamp(16px, 1.6vw, 22px);
  letter-spacing: 0.08em;
  color: rgba(243, 240, 231, 0.48);
  white-space: nowrap;
  transition: color 0.3s;
}
.marquee-track span:hover { color: var(--on-ink); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   MANIFESTO
   ========================================================================== */
.manifesto {
  background: var(--bone);
  border-bottom: 1px solid var(--on-bone-line);
  padding-block: var(--sec);
}
.manifesto .kicker { color: var(--on-bone-dim); }
.manifesto-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) minmax(0, 0.4fr);
  gap: clamp(22px, 4vw, 64px);
  align-items: start;
}
.manifesto-text {
  max-width: 22em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 2.8vw, 38px);
  line-height: 1.58;
  letter-spacing: -0.012em;
  background-image: linear-gradient(90deg, var(--ink) 0 42%, rgba(11, 13, 11, 0.38) 64% 100%);
  background-size: 202% 100%;
  background-position: calc(100% - var(--p, 0) * 100%) 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.manifesto-notes {
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-top: 1px solid var(--ink);
  padding-top: 18px;
}
.manifesto-notes p { font-size: 13px; line-height: 1.85; color: var(--on-bone-dim); max-width: 32ch; }
.manifesto-notes b {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 10px;
  color: var(--accent);
  margin-bottom: 7px;
  letter-spacing: 0.12em;
}

/* ==========================================================================
   SECTION HEAD
   ========================================================================== */
.sec-head { display: grid; gap: 16px; margin-bottom: clamp(32px, 4.2vw, 60px); }
@media (min-width: 1081px) {
  .sec-head:not(.sec-head--row) {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    column-gap: clamp(28px, 6vw, 88px);
  }
  .sec-head:not(.sec-head--row) > .kicker { grid-column: 1 / -1; }
  .sec-head:not(.sec-head--row) > .sec-lede { align-self: end; padding-bottom: 8px; max-width: 36ch; }
}
.sec-head .kicker { color: var(--on-bone-dim); }
.sec-head h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(30px, 4.5vw, 58px);
  line-height: 1.24;
  letter-spacing: -0.018em;
}
.sec-lede {
  max-width: 54ch;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--on-bone-dim);
}
.sec-head--dark .kicker { color: var(--on-ink-dim); }
.sec-head--dark h2 { color: var(--bone); }
.sec-head--row {
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
}

/* ==========================================================================
   CAPABILITY INDEX
   ========================================================================== */
.capability { padding-block: var(--sec); }
.index-list { border-top: 1px solid var(--ink); }
.index-item { border-bottom: 1px solid var(--on-bone-line); }
.index-row {
  width: 100%;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(0, 0.55fr) 36px;
  align-items: center;
  gap: 14px;
  padding: clamp(16px, 2vw, 24px) 0;
  min-height: 64px;
  text-align: left;
  transition: padding-left 0.4s var(--ease-out), color 0.3s;
}
.index-row:hover { padding-left: 8px; }
.index-row .no {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--on-bone-dim);
  transition: color 0.3s;
}
.index-row .name {
  font-family: var(--serif);
  font-size: clamp(20px, 2.3vw, 30px);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.index-row .en { color: var(--on-bone-dim); letter-spacing: 0.1em; justify-self: end; }
.index-row .chev {
  justify-self: end;
  font-size: 20px;
  font-weight: 300;
  transition: transform 0.4s var(--ease-out), color 0.3s;
}
.index-item.is-open .index-row .chev { transform: rotate(45deg); color: var(--accent); }
.index-item.is-open .index-row .no,
.index-item.is-open .index-row .name { color: var(--accent); }

.index-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease-out);
}
.index-item.is-open .index-panel { grid-template-rows: 1fr; }
.index-inner { overflow: hidden; min-height: 0; }
@media (min-width: 761px) { .index-inner { padding-left: 66px; } }
.index-panel p {
  max-width: 64ch;
  padding: 0 0 8px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--on-bone-dim);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 24px; }
.chips li {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border: 1px solid var(--on-bone-line);
  color: var(--on-bone-dim);
}
.chips--dark li { border-color: var(--on-ink-line); color: var(--on-ink-dim); }

/* ==========================================================================
   PRODUCT / DEMO
   ========================================================================== */
.product {
  background: var(--ink);
  color: var(--on-ink);
  padding-block: var(--sec);
  position: relative;
  overflow: hidden;
}
.product::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--on-ink-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--on-ink-line) 1px, transparent 1px);
  background-size: 88px 88px;
  opacity: 0.22;
  mask-image: radial-gradient(ellipse 68% 58% at 72% 28%, #000, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 68% 58% at 72% 28%, #000, transparent 78%);
  pointer-events: none;
}
.product .shell { position: relative; }

.demo-grid {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: start;
}
.demo-side { display: flex; flex-direction: column; gap: 18px; }
.tabs { display: flex; flex-direction: column; border-top: 1px solid var(--on-ink-line); }
.tabs button {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 16px 2px;
  min-height: 56px;
  border-bottom: 1px solid var(--on-ink-line);
  text-align: left;
  color: var(--on-ink-dim);
  font-size: 14px;
  transition: color 0.3s, padding-left 0.4s var(--ease-out);
}
.tabs button i { font-family: var(--mono); font-size: 9px; font-style: normal; opacity: 0.6; }
.tabs button small { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.14em; opacity: 0.5; }
.tabs button:hover { color: var(--on-ink); padding-left: 6px; }
.tabs button[aria-selected="true"] { color: var(--accent); }
.tabs button[aria-selected="true"] i { opacity: 1; }
.demo-note { color: var(--on-ink-dim); font-size: 9.5px; line-height: 1.7; }

.demo-window {
  background: var(--bone);
  color: var(--ink);
  overflow: hidden;
  box-shadow: 0 36px 80px -36px rgba(0, 0, 0, 0.85);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  height: 44px;
  border-bottom: 1px solid var(--on-bone-line);
  font-size: 9px;
  letter-spacing: 0.12em;
}
.window-bar .dots { display: flex; gap: 5px; }
.window-bar .dots i { width: 6px; height: 6px; background: var(--on-bone-line); }
.window-bar .metric { margin-left: auto; color: var(--on-bone-dim); }

.window-body { padding: clamp(18px, 2.8vw, 32px); }
.demo-tag { color: var(--on-bone-dim); letter-spacing: 0.16em; font-size: 9px; }
.query {
  margin: 14px 0 clamp(16px, 2.2vw, 24px);
  padding: 14px 16px;
  background: var(--bone-2);
  border-left: 3px solid var(--accent);
  font-size: 14px;
  line-height: 1.75;
}
.answer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 500;
}
.answer-title span { color: var(--accent); font-size: 0.8em; }
.answer-text { margin: 12px 0 16px; font-size: 13px; line-height: 1.9; color: var(--on-bone-dim); }
.answer-list { border-top: 1px solid var(--on-bone-line); }
.answer-list li {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--on-bone-line);
  font-size: 13px;
  line-height: 1.75;
}
.answer-list b { font-family: var(--mono); font-size: 9px; font-weight: 400; color: var(--accent); padding-top: 4px; flex: none; }
.sources { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 20px; }
.sources span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  padding: 5px 8px;
  border: 1px solid var(--on-bone-line);
  color: var(--on-bone-dim);
}
.ask {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--on-bone-line);
  padding: 8px 8px 8px 14px;
  font-size: 12px;
  color: var(--on-bone-dim);
}
.ask button {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #140804;
  transition: background 0.3s;
  flex: none;
}
.ask button:hover { background: var(--accent-2); }

.demo-window.is-swapping .answer,
.demo-window.is-swapping .query { opacity: 0; transform: translateY(6px); }
.query, .answer { transition: opacity 0.28s var(--ease), transform 0.28s var(--ease); }

/* ==========================================================================
   PROOF
   ========================================================================== */
.proof { padding-block: var(--sec); }

.issue {
  padding: clamp(24px, 3vw, 40px) 0;
  border-top: 1px solid var(--ink);
}
.issue-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: start;
  margin-top: 14px;
}
.issue h3 {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -0.015em;
}
.issue blockquote {
  margin: 22px 0 12px;
  font-family: var(--serif);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.8;
  color: rgba(11, 13, 11, 0.82);
  max-width: 36em;
}
.issue .by { color: var(--on-bone-dim); font-size: 10px; letter-spacing: 0.08em; }

.cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}
.case {
  padding: clamp(22px, 2.6vw, 32px) 0 8px;
  min-width: 0;
}
.case:first-child { padding-right: clamp(16px, 2.4vw, 36px); border-right: 1px solid var(--on-bone-line); }
.case:last-child { padding-left: clamp(16px, 2.4vw, 36px); }
.case-tag { color: var(--accent); letter-spacing: 0.1em; font-size: 9.5px; }
.case h3 {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  line-height: 1.4;
  margin: 12px 0 20px;
}
.case-figs { display: flex; flex-direction: column; gap: 14px; }
.case-figs p { display: flex; align-items: baseline; gap: 12px; }
.case-figs b {
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  min-width: 4.4em;
}
.issue .case-figs { gap: 18px; }
.issue .case-figs b { font-size: clamp(28px, 3vw, 40px); min-width: 4.6em; }
.case-figs small { font-size: 12px; color: var(--on-bone-dim); line-height: 1.45; }
.case blockquote {
  margin: 22px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--on-bone-line);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.85;
  color: rgba(11, 13, 11, 0.8);
}
.case .by { color: var(--on-bone-dim); font-size: 9.5px; letter-spacing: 0.08em; }

.chart-block { margin-top: clamp(36px, 5vw, 68px); border-top: 1px solid var(--on-bone-line); padding-top: 22px; }
.chart-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--on-bone-dim); }
.chart { width: 100%; height: auto; margin-top: 18px; }
.chart .grid path { stroke: var(--on-bone-line); stroke-width: 1; }
.chart-area { fill: rgba(255, 74, 23, 0.08); opacity: 0; transition: opacity 1.1s var(--ease) 0.45s; }
.chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.8s var(--ease-out) 0.18s;
}
.chart-dot { fill: var(--accent); opacity: 0; transition: opacity 0.5s var(--ease) 1.6s; }
.chart-block.is-in .chart-line { stroke-dashoffset: 0; }
.chart-block.is-in .chart-area, .chart-block.is-in .chart-dot { opacity: 1; }
.chart-foot { display: flex; justify-content: space-between; color: var(--on-bone-dim); margin-top: 8px; }

/* ==========================================================================
   TECH
   ========================================================================== */
.tech {
  background: var(--bone-2);
  padding-block: var(--sec);
  border-top: 1px solid var(--on-bone-line);
}
.matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.matrix { width: 100%; max-width: 920px; }
.matrix caption { text-align: left; color: var(--on-bone-dim); padding-bottom: 14px; letter-spacing: 0.14em; }
.matrix thead th {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  font-weight: 400;
  color: var(--on-bone-dim);
  text-align: center;
  padding: 12px 6px;
  border-bottom: 1px solid var(--ink);
}
.matrix thead th:first-child { text-align: left; }
.matrix tbody th {
  text-align: left;
  font-weight: 400;
  font-size: 13.5px;
  padding: 15px 6px;
  border-bottom: 1px solid var(--on-bone-line);
  white-space: nowrap;
}
.matrix tbody td { text-align: center; border-bottom: 1px solid var(--on-bone-line); padding: 15px 6px; }
.matrix tbody td i {
  display: inline-block;
  width: 9px; height: 9px;
  border: 1px solid var(--on-bone-line);
}
.matrix td i.on { background: var(--ink); border-color: var(--ink); }
.matrix td i.half { background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); border-color: var(--ink); }

.certs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(32px, 4vw, 52px);
  border-top: 1px solid var(--ink);
}
.certs li {
  padding: 18px 16px 18px 0;
  border-bottom: 1px solid var(--on-bone-line);
  border-right: 1px solid var(--on-bone-line);
  min-width: 0;
}
.certs li:nth-child(4n) { border-right: 0; padding-right: 0; }
.certs li:nth-child(4n + 1) { padding-left: 0; }
.certs b { display: block; font-size: 13px; font-weight: 500; letter-spacing: 0.01em; }
.certs small { display: block; margin-top: 6px; font-size: 11px; line-height: 1.5; color: var(--on-bone-dim); }

/* ==========================================================================
   COMPANY
   ========================================================================== */
.company { padding-block: var(--sec); }
.team {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
}
.team li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  padding: 22px 20px 22px 0;
  border-bottom: 1px solid var(--on-bone-line);
  min-width: 0;
}
.team li:nth-child(odd) { padding-right: clamp(16px, 2vw, 28px); border-right: 1px solid var(--on-bone-line); }
.team li:nth-child(even) { padding-left: clamp(16px, 2vw, 28px); padding-right: 0; }
.avatar {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  background: var(--ink);
  color: var(--bone);
  flex: none;
}
.avatar b { font-family: var(--serif); font-size: 18px; font-weight: 500; }
.team li:nth-child(2) .avatar { background: var(--accent); color: #140804; }
.team li:nth-child(3) .avatar { background: #2a322c; }
.team li:nth-child(4) .avatar { background: #3a3228; }
.team h3 { font-size: 16px; font-weight: 500; letter-spacing: 0.02em; }
.team .role { color: var(--accent); margin: 4px 0 8px; font-size: 9.5px; letter-spacing: 0.1em; }
.team p:last-child { font-size: 13px; line-height: 1.8; color: var(--on-bone-dim); }

.timeline-wrap { margin-top: clamp(44px, 6vw, 80px); }
.timeline-wrap .kicker { color: var(--on-bone-dim); margin-bottom: 18px; }
.timeline { border-top: 1px solid var(--ink); }
.timeline li {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--on-bone-line);
  align-items: baseline;
}
.timeline time { color: var(--accent); font-size: 11px; letter-spacing: 0.08em; }
.timeline p b { display: block; font-weight: 500; font-size: 15px; margin-bottom: 4px; }
.timeline p span { font-size: 13px; color: var(--on-bone-dim); line-height: 1.8; }

/* ==========================================================================
   INSIGHT
   ========================================================================== */
.insight { padding-bottom: var(--sec); }
.notes { border-top: 1px solid var(--ink); }
.notes li { border-bottom: 1px solid var(--on-bone-line); }
.notes a {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  padding: clamp(16px, 2vw, 24px) 0;
  min-height: 72px;
  transition: padding-left 0.4s var(--ease-out);
}
.notes a:hover { padding-left: 10px; }
.notes time { color: var(--on-bone-dim); font-size: 10.5px; letter-spacing: 0.08em; }
.notes h3 { font-family: var(--serif); font-size: clamp(16px, 1.8vw, 22px); font-weight: 500; line-height: 1.45; }
.notes a:hover h3 { color: var(--accent); }
.note-meta { color: var(--on-bone-dim); font-size: 9.5px; white-space: nowrap; }
.note-arrow { justify-self: end; opacity: 0.5; transition: transform 0.4s var(--ease-out), opacity 0.3s; }
.notes a:hover .note-arrow { transform: translate(3px, -3px); opacity: 1; }

/* ==========================================================================
   CTA
   ========================================================================== */
.cta {
  background: var(--ink);
  color: var(--on-ink);
  padding-block: clamp(64px, 9vw, 128px);
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}
.cta h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(32px, 5.8vw, 76px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 18px 0 clamp(24px, 3.2vw, 38px);
}
.cta .outline {
  padding-left: 0.06em;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
  text-stroke: 1px var(--accent);
}
.cta-act { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 28px); flex-wrap: wrap; }
.hiring {
  margin-top: clamp(32px, 4.6vw, 60px);
  padding-top: 22px;
  border-top: 1px solid var(--on-ink-line);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.hiring .mono { color: var(--on-ink-dim); letter-spacing: 0.14em; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--ink);
  color: var(--on-ink);
  border-top: 1px solid var(--on-ink-line);
  padding: clamp(36px, 4.8vw, 60px) 0 calc(24px + env(safe-area-inset-bottom));
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3.6vw, 44px);
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-addr { font-size: 12px; line-height: 1.9; color: var(--on-ink-dim); }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h3 { color: var(--on-ink-dim); font-size: 9.5px; letter-spacing: 0.16em; margin-bottom: 2px; font-weight: 400; }
.footer-col a { font-size: 13px; color: rgba(243, 240, 231, 0.78); transition: color 0.25s; padding: 2px 0; }
.footer-col a:hover { color: var(--accent); }
.footer-legal {
  margin-top: clamp(28px, 3.6vw, 48px);
  padding-top: 16px;
  border-top: 1px solid var(--on-ink-line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--on-ink-dim);
  font-size: 9.5px;
  line-height: 1.7;
}
.footer-legal a:hover { color: var(--on-ink); }

/* ==========================================================================
   DIALOG
   ========================================================================== */
dialog#contact {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 0;
  background: var(--bone);
  color: var(--ink);
  overflow: auto;
}
dialog#contact::backdrop {
  background: rgba(6, 8, 6, 0.74);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
dialog#contact[open] { animation: dialogIn 0.35s var(--ease-out); }
@keyframes dialogIn { from { opacity: 0; transform: translateY(12px); } }
.dialog-body, .dialog-done { padding: clamp(24px, 3.6vw, 36px); }
.dialog-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 44px; height: 44px;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  color: var(--on-bone-dim);
  z-index: 2;
}
.dialog-close:hover { color: var(--ink); }
dialog .kicker { color: var(--on-bone-dim); }
dialog h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 700;
  margin: 14px 0 10px;
  letter-spacing: -0.01em;
}
.dialog-lede { font-size: 13px; line-height: 1.85; color: var(--on-bone-dim); margin-bottom: 22px; }
.dialog-lede a { color: var(--accent); border-bottom: 1px solid currentColor; }
.dialog-done h2 { margin-bottom: 12px; }
.dialog-done .btn { margin-top: 8px; }

#contactForm { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; color: var(--on-bone-dim); }
.field input, .field select {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--on-bone-line);
  border-radius: 0;
  padding: 12px 12px;
  min-height: 46px;
  transition: border-color 0.25s, background 0.25s;
  width: 100%;
  appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 16px) 20px, calc(100% - 11px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--ink); background: rgba(255, 255, 255, 0.45); }
.field input[aria-invalid="true"] { border-color: var(--accent); }
.form-error { font-size: 12px; color: var(--accent); }
.form-note { font-size: 9px; color: var(--on-bone-dim); text-align: center; letter-spacing: 0.06em; }

/* ==========================================================================
   MOTION / REVEAL
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease) calc(var(--d, 0) * 80ms), transform 0.8s var(--ease-out) calc(var(--d, 0) * 80ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }
  .hero-grid { grid-template-columns: 1fr; align-items: start; min-height: 0; gap: 28px; }
  .hero-side { flex-direction: row; flex-wrap: wrap; gap: 16px 24px; }
  .live { flex: 1 1 220px; }
  .hero-index { flex: 1 1 240px; border-top: 0; }
  .hero-index li:first-child { border-top: 1px solid var(--on-ink-line); }
  .coord { display: none; }
  .demo-grid { grid-template-columns: 1fr; }
  .tabs { flex-direction: row; border-top: 0; border-bottom: 1px solid var(--on-ink-line); }
  .tabs button {
    flex: 1;
    grid-template-columns: 1fr;
    gap: 4px;
    border-bottom: 0;
    border-right: 1px solid var(--on-ink-line);
    padding: 14px 10px;
    min-height: 56px;
  }
  .tabs button:last-child { border-right: 0; }
  .tabs button small { display: none; }
  .issue-grid { grid-template-columns: 1fr; }
  .cases { grid-template-columns: 1fr; }
  .case:first-child, .case:last-child { padding: 22px 0; border-right: 0; }
  .case:first-child { border-bottom: 1px solid var(--on-bone-line); }
  .case-figs { flex-direction: row; flex-wrap: wrap; gap: 12px 22px; }
  .case-figs p { flex-direction: column; gap: 4px; }
  .case-figs b { min-width: 0; }
  .certs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .certs li { padding: 16px 14px 16px 0; }
  .certs li:nth-child(4n), .certs li:nth-child(4n + 1) { border-right: 1px solid var(--on-bone-line); padding-right: 14px; }
  .certs li:nth-child(2n) { border-right: 0; padding-right: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .manifesto-grid { grid-template-columns: 1fr; gap: 20px; }
  .manifesto-text { max-width: none; }
  .manifesto-notes { gap: 14px; }
  .manifesto-notes p { max-width: none; padding-left: 28px; position: relative; }
  .manifesto-notes b { position: absolute; left: 0; top: 0.15em; margin: 0; }
}

@media (max-width: 760px) {
  :root { --nav-h: 62px; --pad: 18px; }
  body { font-size: 15px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div { border-right: 0; padding: 0 0 18px; }
  .stats > div + div { padding-left: 0; }
  .stats > div:nth-child(odd) { padding-right: 14px; }
  .stats > div:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--on-ink-line); }
  .stats > div:nth-child(n + 3) { padding-top: 16px; border-top: 1px solid var(--on-ink-line); }
  .stats dd { font-size: 30px; }
  .hero-side { flex-direction: column; gap: 14px; }
  .coord { display: block; }
  .hero-index { width: 100%; flex: none; }
  .menu-btn { border-color: transparent; }
  .nav-act .btn-outline { display: none; }
  .sec-head--row { grid-template-columns: 1fr; }
  .index-row { grid-template-columns: 36px minmax(0, 1fr) 32px; gap: 8px; }
  .index-inner { padding-left: 44px; }
  .index-row .en { display: none; }
  .notes a {
    grid-template-columns: minmax(0, 1fr) 22px;
    grid-template-areas: "time arrow" "title arrow" "meta arrow";
    row-gap: 6px;
  }
  .notes time { grid-area: time; }
  .notes h3 { grid-area: title; }
  .note-meta { grid-area: meta; }
  .note-arrow { grid-area: arrow; align-self: center; }
  .team { grid-template-columns: 1fr; }
  .team li, .team li:nth-child(odd), .team li:nth-child(even) {
    padding: 18px 0;
    border-right: 0;
  }
  .matrix { min-width: 0; }
  .matrix thead th { padding: 10px 2px; font-size: 8.5px; letter-spacing: 0.02em; }
  .matrix tbody th { padding: 12px 2px; font-size: 12px; }
  .matrix tbody td { padding: 12px 2px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .footer-brand { grid-column: 1 / -1; }
  .btn-lg { width: 100%; justify-content: space-between; }
  .window-bar .metric { display: none; }
  dialog#contact { width: 100vw; max-width: 100vw; margin: 0; max-height: 92dvh; }
  dialog#contact[open] { animation: sheetIn 0.35s var(--ease-out); }
}

@keyframes sheetIn { from { transform: translateY(20px); opacity: 0.6; } }

@media (max-width: 430px) {
  .hero-title { font-size: 34px; }
  .clients-label { letter-spacing: 0.06em; }
  .certs { grid-template-columns: 1fr; }
  .certs li, .certs li:nth-child(2n), .certs li:nth-child(4n) {
    border-right: 0;
    padding: 16px 0;
  }
  .brand-type small { display: none; }
  .case-figs b, .issue .case-figs b { font-size: 24px; }
  .footer-legal { font-size: 9px; }
  .tabs button { padding: 12px 6px; font-size: 13px; }
  .ask span { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .hero-title .line > span { transform: none; }
  .manifesto-text { color: var(--ink); background: none; -webkit-text-fill-color: currentColor; }
  .chart-line { stroke-dashoffset: 0; }
  .chart-area, .chart-dot { opacity: 1; }
}
