/* TensorAI — light editorial system inspired by precision publishing, not AI dashboards. */
:root {
  --paper: #e8e7e1;
  --aluminum-hi: #f2f0ea;
  --aluminum: #d9dad6;
  --aluminum-low: #c7cac8;
  --ink: #171c2a;
  --muted: #596272;
  --faint: #858d9c;
  --line: rgba(23,28,42,.14);
  --coral: #ff7164;
  --electric: #1783ff;
  --electric-soft: rgba(23,131,255,.1);
  --ember: #d96b50;
  --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='720'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0028 0.72' numOctaves='3' seed='11'/%3E%3CfeColorMatrix values='1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0.04'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Instrument Serif", "Songti SC", "STSong", "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 78px; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 10%, rgba(217,107,80,.095), transparent 29%),
    radial-gradient(circle at 64% 9%, rgba(23,131,255,.115), rgba(23,131,255,.035) 26%, transparent 45%),
    linear-gradient(124deg, rgba(23,131,255,.025), transparent 38%, rgba(217,107,80,.035) 76%, transparent),
    radial-gradient(circle at 12% 78%, rgba(229,151,98,.07), transparent 27%),
    linear-gradient(112deg, rgba(255,255,255,.5), transparent 34% 66%, rgba(255,255,255,.2)),
    var(--brush),
    linear-gradient(180deg, var(--aluminum-hi), var(--aluminum) 48%, #e9e7e1);
  background-attachment: fixed;
  font-family: var(--sans);
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
#ambient-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: .72;
  pointer-events: none;
  transition: opacity .8s ease;
}
#cloud-field {
  position: fixed;
  inset: -2.5%;
  z-index: 0;
  width: 105%;
  height: 105%;
  opacity: 0;
  pointer-events: none;
  filter: saturate(.88) contrast(.98);
  transform-origin: 53% 50%;
  will-change: opacity, transform;
  transition: opacity .24s linear;
}
#section-echo {
  position: fixed;
  right: -1.5vw;
  bottom: -11vh;
  z-index: 0;
  color: transparent;
  font-family: var(--sans);
  font-size: clamp(220px, 34vw, 520px);
  font-weight: 700;
  letter-spacing: -.1em;
  line-height: .8;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(22px, 22px, 0);
  -webkit-text-stroke: 1px rgba(23,131,255,.065);
  transition: opacity 1.05s ease, transform 1.05s cubic-bezier(.22,.76,.25,1), -webkit-text-stroke-color 1.05s ease;
}
#section-echo.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }
body.cloud-active #section-echo { -webkit-text-stroke-color: rgba(23,131,255,.035); }
body > main, body > footer { position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; }
img, svg { display: block; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); font-weight: 590; letter-spacing: -.035em; }
html[data-lang="zh"] h1,
html[data-lang="zh"] h2,
html[data-lang="zh"] h3 { letter-spacing: 0; line-height: 1.24; }
::selection { color: var(--ink); background: rgba(255,113,100,.22); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }

#tensor-cursor { display: none; }
@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body, a, button, .nav-tool, [data-tensor] { cursor: none !important; }
  #tensor-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    display: block;
    width: 25px;
    height: 25px;
    color: var(--ink);
    opacity: 0;
    pointer-events: none;
    will-change: transform;
    transition: opacity .18s ease;
  }
  #tensor-cursor.is-visible { opacity: .92; }
  #tensor-cursor svg { width: 100%; height: 100%; overflow: visible; transition: transform .28s cubic-bezier(.2,.8,.2,1); }
  #tensor-cursor.is-active svg { transform: rotate(12deg) scale(1.28); }
}

html[data-lang="en"] [lang="zh"],
html[data-lang="zh"] [lang="en"] { display: none !important; }

.wrap { width: min(1240px, 91vw); margin: 0 auto; }
.lead { max-width: 650px; color: var(--muted); font-size: 18px; }
em {
  color: inherit;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.02em;
}
html[data-lang="zh"] em { font-style: normal; letter-spacing: 0; }

/* ---------- navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.nav.scrolled {
  background: rgba(232,231,225,.86);
  border-color: rgba(23,28,42,.1);
  box-shadow: 0 12px 32px -28px rgba(23,28,42,.5);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}
.nav-in { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 19px; font-weight: 520; letter-spacing: -.02em; }
.logo svg { width: 25px; height: 25px; color: var(--ink); }
.brand-signal { fill: var(--coral); }
.brand-signal-blue { fill: var(--electric); }
.logo b { font-weight: 760; }
.links { display: flex; align-items: center; gap: 27px; margin-left: auto; color: var(--muted); font-size: 14px; }
.links a,
.links a:link,
.links a:visited {
  color: inherit;
  font: inherit;
  font-weight: 500;
  letter-spacing: inherit;
  transition: color .2s ease;
}
.links a:hover,
.links a:focus-visible { color: var(--ink); }
.nav-tools { position: relative; display: flex; align-items: center; gap: 5px; }
.nav-tool {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  transition: color .22s ease, transform .22s ease;
}
.nav-tool::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 3px; height: 3px; border-radius: 50%; background: var(--coral); opacity: 0; transition: opacity .2s ease; }
.nav-tool:hover, .nav-tool:focus-visible { color: var(--ink); background: transparent; transform: translateY(-2px) scale(1.08); }
.nav-tool:hover::after, .nav-tool:focus-visible::after { opacity: 1; }
.social-icon svg { width: 14px; height: 14px; }
.nav-tool[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 9px);
  right: -5px;
  z-index: 2;
  width: max-content;
  max-width: 220px;
  padding: 6px 9px;
  color: var(--ink);
  background: rgba(242,240,234,.94);
  border: 1px solid rgba(23,28,42,.11);
  box-shadow: 0 12px 26px -18px rgba(23,28,42,.55);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .01em;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity .18s ease, transform .18s ease;
}
.nav-tool[data-tooltip]:hover::before,
.nav-tool[data-tooltip]:focus-visible::before,
.nav-tool[data-tooltip].is-copied::before { opacity: 1; transform: translateY(0); }
.lang { width: auto; min-width: 38px; padding: 0 4px; font-size: 10px; font-weight: 700; cursor: pointer; }
.burger { display: none; width: 38px; height: 38px; padding: 10px 8px; border: 0; background: transparent; cursor: pointer; }
.burger i { display: block; height: 1.5px; margin: 6px 0; background: var(--ink); transition: transform .2s ease; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 88svh;
  padding: 108px 0 48px;
  overflow: hidden;
  background: transparent;
}
.hero-wordmark {
  position: absolute;
  top: 5vh;
  left: 50%;
  z-index: 0;
  transform: translateX(-50%) translateY(var(--hero-wordmark-shift, 0px));
  opacity: var(--hero-wordmark-opacity, 1);
  color: rgba(23,28,42,.045);
  font-size: clamp(108px, 21vw, 330px);
  font-weight: 620;
  letter-spacing: -.085em;
  line-height: .9;
  white-space: nowrap;
  user-select: none;
  will-change: transform, opacity;
}
#surface {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: var(--hero-surface-opacity, 1);
  transform: translateY(var(--hero-surface-shift, 0px)) scale(var(--hero-surface-scale, 1));
  transform-origin: 70% 50%;
  pointer-events: none;
  will-change: transform, opacity;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(235,234,228,.98), rgba(235,234,228,.8) 39%, transparent 70%);
}
.hero-in {
  position: relative;
  z-index: 2;
  margin-top: auto;
  margin-bottom: auto;
  opacity: var(--hero-copy-opacity, 1);
  transform: translateY(var(--hero-copy-shift, 0px));
  will-change: transform, opacity;
}
.hero .eyebrow { margin-bottom: 24px; }
.hero h1 {
  max-width: 900px;
  margin-bottom: 28px;
  font-size: clamp(50px, 7.2vw, 96px);
  font-weight: 610;
  letter-spacing: -.058em;
  line-height: .96;
}
html[data-lang="zh"] .hero h1 { max-width: none; font-size: clamp(42px, 6.3vw, 82px); line-height: 1.12; white-space: nowrap; }
.hero .lead { font-size: clamp(17px, 1.45vw, 20px); }
.founding-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(232,231,225,.32); }
.founding-line { display: flex; align-items: center; gap: 13px; min-height: 58px; overflow-x: auto; color: var(--muted); white-space: nowrap; scrollbar-width: none; }
.founding-line::-webkit-scrollbar { display: none; }
.founding-kicker { color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .105em; text-transform: uppercase; }
.founding-lab { color: var(--ink); font-size: 15px; font-weight: 560; letter-spacing: -.025em; }
.founding-lab b { font-weight: 760; }
.founding-lab-meta { text-shadow: 0 0 18px rgba(23,131,255,.11); }
.founding-lab-deepmind { text-shadow: 0 0 18px rgba(255,113,100,.11); }
.founding-separator { color: var(--coral); font-family: var(--serif); font-size: 17px; }
/* ---------- editorial sections ---------- */
.sec { position: relative; padding: clamp(98px, 8.5vw, 132px) 0; }
#why { padding-top: clamp(110px, 9vw, 144px); }
.sec.alt {
  width: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.editorial {
  display: block;
}
.section-head,
.section-body {
  display: grid;
  grid-template-columns: minmax(270px, .82fr) minmax(0, 1.18fr);
  column-gap: clamp(42px, 5.5vw, 82px);
}
.section-head { align-items: end; row-gap: 0; }
.section-head .eyebrow { grid-column: 1 / -1; }
.section-head h2 {
  grid-column: 1;
  margin: 0;
  font-size: clamp(32px, 3.4vw, 49px);
  line-height: 1.05;
}
.section-head .section-intro { grid-column: 2; align-self: end; padding-bottom: 3px; }
.section-head-wide h2 { grid-column: 1 / -1; max-width: 900px; }
.section-body {
  height: clamp(300px, 26vw, 340px);
  margin-top: 44px;
  align-items: stretch;
}
.section-copy {
  position: relative;
  min-width: 0;
  height: 100%;
  align-self: start;
}
.section-body > .grid3,
.section-body > .grid2,
.section-body > .tags {
  min-height: 100%;
  height: 100%;
  align-items: stretch;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 22px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .105em;
  text-transform: uppercase;
}
.eyebrow::before { content: attr(data-index); color: var(--coral); font-variant-numeric: tabular-nums; }
.eyebrow::after { content: ""; width: 46px; height: 1px; background: linear-gradient(90deg, var(--line) 0 72%, var(--coral) 72% 80%, transparent 80% 86%, var(--electric) 86% 94%, transparent 94%); }
.section-intro { max-width: 520px; margin: 0; color: var(--muted); font-size: 16px; }
.section-tensor { position: relative; width: 100%; height: 100%; margin: 0; opacity: 1; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.section-tensor::before {
  content: "";
  position: absolute;
  inset: 58% 16% 12%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at 55% 61%, rgba(23,28,42,.075), rgba(23,28,42,.025) 34%, transparent 67%);
  filter: blur(17px);
  opacity: .32;
  pointer-events: none;
  transform: scale(.96);
  transition: opacity .45s ease, transform .55s cubic-bezier(.22,.76,.25,1);
}
.section-tensor::after {
  content: "DRAG ↕ SCALE · DOUBLE-CLICK RESET";
  position: absolute;
  right: 8px;
  bottom: 5px;
  z-index: 2;
  color: rgba(89,98,114,.58);
  font-size: 8px;
  font-weight: 720;
  letter-spacing: .1em;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: color .25s ease, opacity .25s ease, transform .25s ease;
}
html[data-lang="zh"] .section-tensor::after { content: "上下拖动缩放 · 双击复位"; }
.section-tensor:hover::before { opacity: .4; transform: scale(1); }
.section-tensor:hover::after { color: rgba(23,28,42,.8); opacity: 1; transform: translateY(-2px); }
.section-tensor.is-dragging::before { opacity: .46; transform: scale(1.015); }
.section-tensor.is-dragging::after { content: "SCALE " attr(data-zoom); color: var(--electric); opacity: 1; }
html[data-lang="zh"] .section-tensor.is-dragging::after { content: "缩放 " attr(data-zoom); }
.section-tensor.is-resetting::before { transform: scale(.98); }
.section-tensor canvas { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
.tensor-detail {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  bottom: auto;
  z-index: 2;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 13px;
  width: min(430px, 100%);
  min-height: 90px;
  margin: 0;
  padding: 15px 15px 14px 18px;
  border: 1px solid rgba(255,255,255,.34);
  background: linear-gradient(118deg, rgba(242,240,234,.78), rgba(217,218,214,.52));
  box-shadow: 0 18px 42px -36px rgba(23,28,42,.5);
  backdrop-filter: blur(13px) saturate(1.12);
  -webkit-backdrop-filter: blur(13px) saturate(1.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.2,1), visibility .25s;
  pointer-events: none;
}
.tensor-detail::before { content: ""; position: absolute; top: 16px; bottom: 12px; left: 0; width: 1px; background: linear-gradient(180deg, var(--coral), var(--electric)); transform: scaleY(.15); transform-origin: top; transition: transform .35s ease; }
.tensor-detail.is-visible { opacity: 1; visibility: visible; transform: none; }
.tensor-detail.is-visible::before { transform: scaleY(1); }
.tensor-detail-marker { padding-top: 2px; color: var(--coral); font-size: 10px; font-weight: 760; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
#services .tensor-detail-marker,
#expertise .tensor-detail-marker { color: var(--electric); }
.tensor-detail-copy { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.62; }
.tensor-detail:not(.is-visible) .tensor-detail-copy { display: none; }
.tensor-detail { display: none; }

/* evidence rows */
.grid3, .grid2 { display: grid; grid-template-columns: 1fr; }
.grid3 { grid-template-rows: repeat(3, minmax(0, 1fr)); }
.grid2 { grid-template-rows: repeat(4, minmax(0, 1fr)); }
.grid3 > :last-child,
.grid2 > :last-child { border-bottom: 1px solid var(--line); }
.card, .svc, .tag { border-top: 1px solid var(--line); }
.card > p,
.svc > div > p,
.tag > span[lang] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.card {
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: 24px;
  align-items: center;
  padding: 16px 0 17px;
  transition: border-color .25s ease, transform .25s ease, background .25s ease, box-shadow .25s ease;
}
.card:hover, .svc:hover, .tag:hover { border-color: var(--ink); transform: translateX(3px); }
[data-tensor].is-active {
  border-color: var(--ink);
  transform: translateX(9px);
  background: linear-gradient(90deg, var(--electric-soft), transparent 72%);
  box-shadow: inset 3px 0 0 var(--electric);
}
#services [data-tensor].is-active {
  background: linear-gradient(90deg, var(--electric-soft), transparent 72%);
  box-shadow: inset 3px 0 0 var(--electric);
}
.card.is-active .ic,
.svc.is-active .no { color: var(--coral); }
.card .ic {
  grid-column: 1;
  grid-row: 1 / span 2;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}
.card h3 { grid-column: 2; margin: 0; font-size: 22px; line-height: 1.2; }
.card p { grid-column: 2; max-width: 650px; margin: 0; color: var(--muted); font-size: 15.5px; }

.svc { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 18px; padding: 14px 0 15px; transition: border-color .25s ease, transform .25s ease, background .25s ease, box-shadow .25s ease; }
.no { padding-top: 3px; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.svc h3 { margin: 0; font-size: 22px; line-height: 1.2; }
.svc p { max-width: 650px; margin: 0; color: var(--muted); font-size: 15.5px; }

.tags { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, minmax(0, 1fr)); column-gap: 42px; }
.tags > :nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
.tag { position: relative; display: flex; align-items: center; min-height: 0; padding: 15px 0 16px; color: var(--muted); font-size: 14px; transition: border-color .25s ease, transform .25s ease, background .25s ease, box-shadow .25s ease; }
.tag::after { content: "↗"; position: absolute; top: 50%; right: 0; color: var(--faint); transform: translateY(-50%); transition: color .2s ease, transform .2s ease; }
.tag:hover::after { color: var(--electric); transform: translate(2px, calc(-50% - 2px)); }
.tag b { display: block; max-width: 85%; margin: 0; color: var(--ink); font-size: 19px; font-weight: 600; }

/* Explanations open inside the active title rail, beside the Tensor. */
.grid3:has(> :nth-child(1)[aria-expanded="true"]) { grid-template-rows: auto 1fr 1fr; }
.grid3:has(> :nth-child(2)[aria-expanded="true"]) { grid-template-rows: 1fr auto 1fr; }
.grid3:has(> :nth-child(3)[aria-expanded="true"]) { grid-template-rows: 1fr 1fr auto; }
.grid2:has(> :nth-child(1)[aria-expanded="true"]) { grid-template-rows: auto 1fr 1fr 1fr; }
.grid2:has(> :nth-child(2)[aria-expanded="true"]) { grid-template-rows: 1fr auto 1fr 1fr; }
.grid2:has(> :nth-child(3)[aria-expanded="true"]) { grid-template-rows: 1fr 1fr auto 1fr; }
.grid2:has(> :nth-child(4)[aria-expanded="true"]) { grid-template-rows: 1fr 1fr 1fr auto; }
.tags:has(> :nth-child(1)[aria-expanded="true"]),
.tags:has(> :nth-child(2)[aria-expanded="true"]) { grid-template-rows: auto 1fr 1fr; }
.tags:has(> :nth-child(3)[aria-expanded="true"]),
.tags:has(> :nth-child(4)[aria-expanded="true"]) { grid-template-rows: 1fr auto 1fr; }
.tags:has(> :nth-child(5)[aria-expanded="true"]),
.tags:has(> :nth-child(6)[aria-expanded="true"]) { grid-template-rows: 1fr 1fr auto; }
.card[aria-expanded="true"],
.svc[aria-expanded="true"] { align-items: start; }
.tag[aria-expanded="true"] { flex-direction: column; align-items: flex-start; justify-content: center; }
.card[aria-expanded="true"] > p,
.svc[aria-expanded="true"] > div > p,
html[data-lang="en"] .tag[aria-expanded="true"] > span[lang="en"],
html[data-lang="zh"] .tag[aria-expanded="true"] > span[lang="zh"] {
  position: static !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 8px 0 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
}
.tag[aria-expanded="true"] > span[lang] { max-width: 92%; color: var(--muted); font-size: 12.5px; line-height: 1.48; }

/* Three sections, three related but distinct editorial compositions. */
#services .section-head .eyebrow { justify-content: flex-end; }
#services .section-head h2 { margin-left: auto; text-align: right; }
#services .section-body {
  grid-template-areas: "list tensor";
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  height: 400px;
}
#services .section-copy { grid-area: tensor; }
#services .grid2 {
  grid-area: list;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
}
#services .svc { grid-template-columns: 38px 1fr; gap: 10px; }
#services .svc h3 { font-size: 20px; }
#services .svc:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
#services .grid2 > :nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
#services .grid2:has(> :nth-child(1)[aria-expanded="true"]),
#services .grid2:has(> :nth-child(2)[aria-expanded="true"]) { grid-template-rows: auto 1fr; }
#services .grid2:has(> :nth-child(3)[aria-expanded="true"]),
#services .grid2:has(> :nth-child(4)[aria-expanded="true"]) { grid-template-rows: 1fr auto; }

#expertise .section-head { display: block; text-align: center; }
#expertise .section-head .eyebrow { justify-content: center; }
#expertise .section-head h2 { margin-inline: auto; }
#expertise .section-body {
  display: grid;
  grid-template-columns: minmax(190px, .9fr) minmax(360px, 1.25fr) minmax(190px, .9fr);
  column-gap: clamp(24px, 4vw, 56px);
  align-items: stretch;
  height: 400px;
  margin-top: 28px;
}
#expertise .section-copy { grid-column: 2; grid-row: 1; width: 100%; height: 100%; }
#expertise .expertise-rail {
  width: auto;
  min-height: 0;
  height: 100%;
  margin: 0;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  column-gap: 0;
}
#expertise .expertise-rail-left { grid-column: 1; grid-row: 1; }
#expertise .expertise-rail-right { grid-column: 3; grid-row: 1; }
#expertise .tag { min-height: 0; }
#expertise .expertise-rail-left .tag { align-items: flex-end; padding-right: 24px; text-align: right; }
#expertise .expertise-rail-left .tag::after { content: "→"; }
#expertise .expertise-rail-left .tag[aria-expanded="true"] { align-items: flex-end; }
#expertise .expertise-rail-right .tag { padding-left: 24px; }
#expertise .expertise-rail-right .tag::after { right: auto; left: 0; content: "←"; }
#expertise .expertise-rail-right .tag:hover::after { transform: translate(-2px, calc(-50% - 2px)); }
#expertise [data-tensor].is-active { background: linear-gradient(90deg, rgba(23,131,255,.09), transparent 72%); box-shadow: inset 3px 0 0 var(--electric); }
#expertise .expertise-rail-left [data-tensor].is-active { background: linear-gradient(270deg, rgba(23,131,255,.09), transparent 72%); box-shadow: inset -3px 0 0 var(--electric); }
#expertise .expertise-rail > :nth-last-child(-n + 2) { border-bottom: 0; }
#expertise .expertise-rail > :last-child { border-bottom: 1px solid var(--line); }
#expertise .expertise-rail:has(> :nth-child(1)[aria-expanded="true"]) { grid-template-rows: auto 1fr 1fr; }
#expertise .expertise-rail:has(> :nth-child(2)[aria-expanded="true"]) { grid-template-rows: 1fr auto 1fr; }
#expertise .expertise-rail:has(> :nth-child(3)[aria-expanded="true"]) { grid-template-rows: 1fr 1fr auto; }

/* A minimal fourth movement: the email is the call to action. */
.contact-sec { padding-top: clamp(116px, 9.5vw, 152px); padding-bottom: clamp(82px, 7vw, 108px); }
.contact-in {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  column-gap: clamp(46px, 7vw, 104px);
  row-gap: 30px;
  align-items: end;
  padding: 34px 0 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.contact-in .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.contact-mission {
  grid-column: 1;
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 3.7vw, 50px);
  font-weight: 570;
  letter-spacing: -.043em;
  line-height: 1.06;
}
.contact-channel { grid-column: 2; align-self: end; }
.contact-label { display: block; margin-bottom: 10px; color: var(--faint); font-size: 10px; font-weight: 720; letter-spacing: .11em; text-transform: uppercase; }
.contact-mail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0 12px;
  color: var(--ink);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 590;
  letter-spacing: -.025em;
  line-height: 1.2;
  transition: border-color .25s ease;
}
.contact-mail span { position: relative; flex: 0 0 auto; color: var(--electric); font-family: var(--serif); font-size: .8em; font-weight: 400; transition: transform .25s ease; }
.contact-mail span::after { content: ""; position: absolute; right: -4px; bottom: -3px; width: 5px; height: 5px; border-radius: 50%; background: var(--coral); }
.contact-mail:hover { border-color: var(--ink); }
.contact-mail:hover span { transform: translate(5px, -5px); }
.contact-vision { grid-column: 1 / -1; max-width: 980px; margin: 0; padding-top: 3px; color: var(--faint); font-size: 12.5px; line-height: 1.6; }
.contact-vision b { color: var(--muted); font-weight: 680; letter-spacing: .02em; }

/* ---------- footer and motion ---------- */
.foot { padding: 38px 0 44px; color: var(--muted); background: rgba(232,231,225,.42); font-size: 13px; }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.logo.sm { color: var(--ink); font-size: 16px; }
.logo.sm svg { width: 20px; height: 20px; color: var(--ink); }
.foot-meta { display: flex; align-items: center; gap: clamp(18px, 3vw, 38px); }
.foot-legal { display: flex; align-items: center; gap: 20px; }
.foot-legal a { color: var(--muted); transition: color .2s ease; }
.foot-legal a[aria-current="page"] { color: var(--ink); }
.foot a:hover, .foot a:focus-visible { color: var(--ink); }

/* ---------- legal pages ---------- */
.legal-main { min-height: calc(100svh - 100px); padding: 126px 0 88px; }
.legal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: end;
  padding: 42px 0 48px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.legal-hero .eyebrow { grid-column: 1 / -1; margin-bottom: 4px; }
.legal-hero h1 { max-width: 850px; margin: 0; font-size: clamp(52px, 7vw, 94px); line-height: .94; }
.legal-updated { margin: 0 0 6px; color: var(--faint); font-size: 11px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.legal-layout {
  display: grid;
  grid-template-columns: minmax(170px, .45fr) minmax(0, 1.55fr);
  gap: clamp(54px, 9vw, 132px);
  align-items: start;
  padding-top: 58px;
}
.legal-toc { position: sticky; top: 104px; display: grid; gap: 3px; }
.legal-toc-label { margin: 0 0 12px; color: var(--faint); font-size: 10px; font-weight: 720; letter-spacing: .12em; text-transform: uppercase; }
.legal-toc a { width: fit-content; padding: 4px 0; color: var(--muted); font-size: 12px; transition: color .2s ease, transform .2s ease; }
.legal-toc a:hover, .legal-toc a:focus-visible { color: var(--ink); transform: translateX(3px); }
.legal-content { max-width: 810px; }
.legal-intro { margin: 0 0 54px; color: var(--muted); font-family: var(--serif); font-size: clamp(23px, 2.4vw, 34px); line-height: 1.22; }
.legal-section { padding-bottom: 38px; margin-bottom: 40px; border-bottom: 1px solid var(--line); scroll-margin-top: 105px; }
.legal-section:last-child { margin-bottom: 0; }
.legal-section h2 { margin-bottom: 17px; font-size: clamp(23px, 2.3vw, 32px); line-height: 1.15; }
.legal-section h3 { margin: 26px 0 10px; font-size: 15px; letter-spacing: -.015em; }
.legal-section p, .legal-section li { color: var(--muted); font-size: 14px; line-height: 1.78; }
.legal-section p { margin-bottom: 14px; }
.legal-section ul { margin: 12px 0 18px; padding-left: 20px; }
.legal-section li + li { margin-top: 7px; }
.legal-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
  padding-bottom: 4px;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  font-weight: 620;
}
.legal-contact::after { content: "↗"; color: var(--electric); font-family: var(--serif); }
.legal-contact:hover::after { transform: translate(2px, -2px); }
.legal-inline-link { color: var(--ink); border-bottom: 1px solid rgba(23,28,42,.35); }
.scroll-word-reveal .reveal-token {
  display: inline-block;
  opacity: var(--token-opacity, .08);
  clip-path: inset(0 var(--token-clip, 0%) 0 0);
  filter: blur(var(--token-blur, 2.5px));
  transform: translate3d(var(--token-x, 0), var(--token-y, .5em), 0) rotate(var(--token-rotate, 0deg)) scale(var(--token-scale, .94));
  transform-origin: 50% 100%;
  will-change: opacity, clip-path, filter, transform;
}
.reveal-style-wipe .reveal-token { transform-origin: 0 50%; }
.reveal-style-split .reveal-token { transform-origin: 50% 65%; }
.reveal-style-focus .reveal-token { transform-origin: 50% 50%; }
.rv {
  opacity: 0;
  filter: blur(6px);
  translate: 0 42px;
  scale: 1;
  transition: opacity .9s cubic-bezier(.22,.76,.25,1), translate .9s cubic-bezier(.22,.76,.25,1), scale .9s cubic-bezier(.22,.76,.25,1), filter .9s ease;
  transition-delay: var(--rv-delay, 0ms);
}
.rv.rv-from-left { translate: -72px 0; }
.rv.rv-from-right { translate: 72px 0; }
.rv.rv-scale { translate: 0 24px; scale: .88; }
.rv.in { opacity: 1; filter: blur(0); translate: 0 0; scale: 1; }

@media (max-width: 980px) {
  .section-head,
  .section-body { grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr); column-gap: 36px; }
  .section-body { height: 340px; }
  #services .section-body { grid-template-columns: minmax(0, 1.1fr) minmax(285px, .9fr); height: 380px; }
  .section-copy { max-width: none; }
  .section-tensor { width: min(360px, 100%); }
  .tags { grid-template-columns: 1fr 1fr; }
  #expertise .section-body { grid-template-columns: minmax(165px, .9fr) minmax(300px, 1.25fr) minmax(165px, .9fr); column-gap: 24px; height: 380px; }
  .hero::after { background: linear-gradient(90deg, rgba(235,234,228,.96), rgba(235,234,228,.68) 58%, transparent); }
}

@media (max-width: 760px) {
  .nav-in { gap: 10px; }
  .burger { display: block; }
  .links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin: 0;
    padding: 10px 5vw 24px;
    background: rgba(232,231,225,.98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 32px -24px rgba(23,28,42,.35);
    transform: translateY(-120%);
    transition: transform .3s ease;
  }
  .links a { width: 100%; padding: 12px 0; }
  .nav.open .links { transform: none; }
  .nav.open .burger i:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav.open .burger i:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav-tools { margin-left: auto; gap: 2px; }
  .nav-tool { width: 27px; height: 27px; }
  .lang { min-width: 34px; padding-inline: 2px; }
  .lang-text { font-size: 9px; }
  .hero { min-height: 760px; padding-top: 102px; }
  .hero-wordmark { top: 12vh; font-size: 34vw; }
  .hero::after { background: linear-gradient(180deg, rgba(235,234,228,.8), rgba(235,234,228,.12) 58%, rgba(235,234,228,.72)); }
  #ambient-field { opacity: .5; }
  #cloud-field { inset: -4%; width: 108%; height: 108%; filter: saturate(.82) contrast(.97); }
  #section-echo { right: -4vw; bottom: -4vh; font-size: 62vw; -webkit-text-stroke-color: rgba(23,131,255,.045); }
  #surface { opacity: .62; }
  .hero h1 { font-size: clamp(48px, 14vw, 72px); }
  html[data-lang="zh"] .hero h1 { font-size: clamp(32px, 9vw, 40px); white-space: nowrap; }
  .section-head,
  .section-body { grid-template-columns: 1fr; column-gap: 0; }
  .section-head h2,
  .section-head .section-intro,
  .section-head-wide h2 { grid-column: 1; }
  .section-head .section-intro { margin-top: 17px; padding-bottom: 0; }
  .section-body { height: auto; margin-top: 34px; row-gap: 24px; }
  .section-copy { position: static; height: min(72vw, 300px); }
  .section-tensor { width: min(320px, 92%); height: 100%; margin-inline: auto; }
  .section-tensor::after { display: none; }
  .section-tensor::before { opacity: .24; filter: blur(14px); }
  .tensor-detail { display: none; }
  #services .section-head .eyebrow { justify-content: flex-start; }
  #services .section-head h2 { margin-left: 0; text-align: left; }
  #services .section-body { grid-template-areas: "tensor" "list"; height: auto; }
  #services .section-copy { grid-area: tensor; }
  #services .grid2,
  #services .grid2:has(> :nth-child(1)[aria-expanded="true"]),
  #services .grid2:has(> :nth-child(2)[aria-expanded="true"]),
  #services .grid2:has(> :nth-child(3)[aria-expanded="true"]),
  #services .grid2:has(> :nth-child(4)[aria-expanded="true"]) {
    grid-area: list;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    column-gap: 0;
  }
  #services .svc:nth-child(even) { padding-left: 0; border-left: 0; }
  #expertise .section-body { display: flex; flex-direction: column; align-items: stretch; height: auto; }
  #expertise .section-copy { width: min(320px, 92%); height: min(72vw, 300px); }
  #expertise .section-copy { order: 0; align-self: center; }
  #expertise .expertise-rail { width: 100%; min-height: 0; height: auto; }
  #expertise .expertise-rail-left { order: 1; }
  #expertise .expertise-rail-right { order: 2; }
  #expertise .expertise-rail-left .tag,
  #expertise .expertise-rail-right .tag,
  #expertise .expertise-rail-left .tag[aria-expanded="true"] { align-items: flex-start; padding-left: 0; padding-right: 0; text-align: left; }
  #expertise .expertise-rail-left .tag::after,
  #expertise .expertise-rail-right .tag::after { right: 0; left: auto; content: "↗"; }
  #expertise .expertise-rail-right .tag:hover::after { transform: translate(2px, calc(-50% - 2px)); }
  #expertise .expertise-rail-left [data-tensor].is-active { background: linear-gradient(90deg, rgba(23,131,255,.09), transparent 72%); box-shadow: inset 3px 0 0 var(--electric); }
  #expertise .tags,
  #expertise .tags:has(> :nth-child(1)[aria-expanded="true"]),
  #expertise .tags:has(> :nth-child(2)[aria-expanded="true"]),
  #expertise .tags:has(> :nth-child(3)[aria-expanded="true"]),
  #expertise .tags:has(> :nth-child(4)[aria-expanded="true"]),
  #expertise .tags:has(> :nth-child(5)[aria-expanded="true"]),
  #expertise .tags:has(> :nth-child(6)[aria-expanded="true"]) {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .card[aria-expanded="true"] > p,
  .svc[aria-expanded="true"] > div > p,
  html[data-lang="en"] .tag[aria-expanded="true"] > span[lang="en"],
  html[data-lang="zh"] .tag[aria-expanded="true"] > span[lang="zh"] {
    position: static !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 10px 0 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
  }
  .founding-line { gap: 9px; min-height: 50px; }
  .founding-lab { font-size: 12.5px; }
  .founding-kicker { font-size: 9px; }
  .founding-lab { font-size: 14px; }
  .sec { padding: 72px 0; }
  #why { padding-top: 78px; }
  .contact-sec { padding-top: 86px; padding-bottom: 64px; }
  .contact-in { grid-template-columns: 1fr; row-gap: 25px; padding: 29px 0 24px; }
  .contact-in .eyebrow,
  .contact-mission,
  .contact-channel,
  .contact-vision { grid-column: 1; }
  .contact-mission { font-size: clamp(26px, 7.4vw, 38px); }
  .contact-mail { gap: 14px; overflow-wrap: anywhere; font-size: clamp(18px, 5.8vw, 24px); }
  .foot-in { align-items: flex-start; }
  .foot-meta { width: 100%; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; }
  .foot-legal { align-items: flex-start; gap: 14px; }
  .legal-main { padding: 98px 0 64px; }
  .legal-hero { grid-template-columns: 1fr; gap: 20px; padding: 32px 0 34px; }
  .legal-hero h1 { font-size: clamp(46px, 15vw, 68px); }
  .legal-layout { grid-template-columns: 1fr; gap: 42px; padding-top: 38px; }
  .legal-toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 24px; border-bottom: 1px solid var(--line); }
  .legal-toc-label { grid-column: 1 / -1; }
  .legal-toc a { width: auto; }
  .legal-intro { margin-bottom: 42px; }
  .legal-section { padding-bottom: 30px; margin-bottom: 32px; }
  .tags { grid-template-columns: 1fr; }
  .card { grid-template-columns: 40px 1fr; column-gap: 16px; }
  .svc { grid-template-columns: 42px 1fr; gap: 10px; }
  .quote { border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #section-echo { transition: none; }
  #cloud-field { transform: none !important; transition: opacity .3s ease; }
  .section-tensor::after { display: none; }
  .section-tensor::before, .section-tensor canvas { transition: none; }
  .rv { opacity: 1; filter: none; translate: 0 0; scale: 1; transition: none; }
  .scroll-word-reveal .reveal-token { opacity: 1; clip-path: none; filter: none; transform: none; }
  .card:hover, .svc:hover, .tag:hover { transform: none; }
  .tensor-detail { transition: none; }
}
