:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --soft: #f5f5f7;
  --line: #d2d2d7;
  --blue: #0071e3;
  --blue-strong: #0058b0;
  --green: #248a3d;
  --orange: #c93400;
  --white: #ffffff;
  --code: #111827;
  --max: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--white);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
}

.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(18px);
}

.nav {
  width: min(calc(100% - 32px), var(--max));
  min-height: 56px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #424245;
  font-size: 14px;
}

.nav-links a { text-decoration: none; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--blue); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.lang-switch a {
  min-width: 38px;
  padding: 3px 9px;
  text-align: center;
}

.lang-switch .active {
  color: white;
  background: var(--ink);
}

main { overflow: hidden; }

.container {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 56px);
  min-height: min(780px, calc(100svh - 56px));
  display: grid;
  align-content: center;
  padding: 72px 0 54px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

h1 {
  max-width: 920px;
  margin: 0;
  font-size: 52px;
  line-height: 1.08;
  font-weight: 750;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 760px;
  margin: 24px 0 0;
  color: #424245;
  font-size: 20px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  color: white;
  background: var(--blue);
  font-weight: 650;
  text-decoration: none;
}

.button:hover, .button:focus-visible { background: var(--blue-strong); }
.button.secondary { color: var(--blue); background: white; }

.workflow-strip {
  margin-top: 48px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.workflow-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: flow;
}

.workflow-list li {
  position: relative;
  min-height: 68px;
  padding: 0 28px 0 38px;
  color: #424245;
  font-size: 15px;
}

.workflow-list li::before {
  counter-increment: flow;
  content: counter(flow, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 750;
}

.workflow-list li:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 0;
  right: 8px;
  color: #a1a1a6;
}

.band { padding: 96px 0; }
.band.soft { background: var(--soft); }
.band.dark { color: white; background: var(--ink); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.65fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 42px;
}

h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.16;
  font-weight: 720;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0;
}

.lead, .section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.band.dark .lead, .band.dark .section-head p { color: #c7c7cc; }

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.case-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 470px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.case-card .visual {
  height: 190px;
  margin: -8px -8px 24px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e5e5ea;
  border-radius: 6px;
  background: #f7f7f9;
}

.case-card .visual.app-icon img { width: 132px; height: 132px; }
.case-card .visual.screenshot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 9px;
  border-radius: 999px;
  color: #424245;
  background: #ececf0;
  font-size: 13px;
  font-weight: 650;
}

.tag.blue { color: #064a8f; background: #e8f3ff; }
.tag.green { color: #17672a; background: #eaf7ed; }
.tag.orange { color: #8f2d0a; background: #fff0e9; }

.case-card p { margin: 0; color: var(--muted); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  color: var(--blue);
  font-weight: 650;
  text-decoration: none;
}

.text-link::after { content: "›"; font-size: 24px; line-height: 1; }

.logic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.logic-item {
  min-height: 200px;
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.logic-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 14px;
}

.logic-item p { margin: 0; color: var(--muted); }

.model-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 18px 20px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #424245; background: #fafafa; font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }

.proof-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: center;
}

.proof-image {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.08);
}

.proof-image img { width: 100%; height: auto; }

.check-list { margin: 26px 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; margin: 12px 0; padding-left: 28px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }

.cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: center;
}

.cta p { max-width: 720px; margin: 14px 0 0; color: #c7c7cc; font-size: 18px; }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
  gap: 56px;
  align-items: start;
}

.contact-copy p {
  color: #c7c7cc;
  font-size: 18px;
}

.contact-copy a { color: white; text-underline-offset: 4px; }

.contact-copy .email-link {
  display: inline-block;
  margin-top: 12px;
  color: white;
  font-size: 20px;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.contact-form {
  padding: 28px;
  border-radius: 8px;
  color: var(--ink);
  background: white;
}

.contact-form h3 { font-size: 24px; }
.contact-form p { margin: 0 0 22px; color: var(--muted); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field > span { font-size: 14px; font-weight: 700; }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #b7b7bc;
  border-radius: 6px;
  color: var(--ink);
  background: white;
  font: inherit;
}

.field textarea { min-height: 150px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: 3px solid rgba(0, 113, 227, 0.2); border-color: var(--blue); }

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}

.form-actions button { cursor: pointer; font: inherit; }
.form-status { min-height: 24px; margin: 0; color: var(--green); font-size: 14px; }
.privacy-note { display: block; margin-top: 12px; color: var(--muted); font-size: 13px; }

.deep-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.deep-link {
  display: block;
  min-height: 180px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  text-decoration: none;
}

.deep-link p { margin: 0; color: var(--muted); }
.deep-link strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 20px; }
.deep-link span { display: block; color: var(--muted); }
.deep-link .text-link { display: inline-flex; }

.toc {
  margin: 28px 0 0;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.toc h2 { font-size: 20px; }
.toc > strong { display: block; margin-bottom: 8px; color: var(--ink); }
.toc > a { display: inline-block; margin: 4px 18px 4px 0; color: var(--blue); text-decoration: none; }
.toc ol { columns: 2; column-gap: 36px; padding-left: 22px; }
.toc li { break-inside: avoid; margin: 8px 0; }
.toc a { color: var(--blue); text-decoration: none; }

.stage {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.step-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: detail-step;
}

.step-list > li {
  position: relative;
  margin: 0;
  padding: 26px 0 28px 64px;
  border-bottom: 1px solid var(--line);
  counter-increment: detail-step;
}

.step-list > li::before {
  content: counter(detail-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 26px;
  width: 44px;
  color: var(--blue);
  font: 700 15px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.step-list h3 { margin: 0 0 8px; }
.step-list p { margin: 8px 0; }

.io-line {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  margin: 8px 0;
  font-size: 15px;
}

.io-line strong { color: var(--ink); }

.model-detail {
  margin-top: 42px;
  padding-top: 42px;
  border-top: 1px solid var(--line);
}

.model-detail:first-of-type { margin-top: 28px; }

.model-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr);
  gap: 1px;
  margin: 24px 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.model-summary div { min-height: 110px; padding: 18px; background: white; }
.model-summary strong { display: block; margin-bottom: 6px; color: var(--ink); }
.model-summary span { color: var(--muted); font-size: 14px; }

.pro-con {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.pro-con section,
.pro-con > div {
  margin: 0;
  padding: 22px;
  border-radius: 8px;
  background: var(--soft);
}

.pro-con h3 { margin: 0 0 12px; }
.pro-con ul { margin-bottom: 0; padding-left: 22px; }

.data-contract {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.data-contract dl { margin: 0; }
.data-contract strong,
.data-contract code,
.data-contract span { display: block; }
.data-contract strong { margin-bottom: 10px; color: var(--ink); }
.data-contract code { overflow-wrap: anywhere; color: #1d1d1f; }
.data-contract code + code { margin-top: 7px; }
.data-contract span { margin-top: 10px; color: var(--muted); font-size: 14px; }
.data-contract dt { margin-top: 16px; color: var(--ink); font-weight: 700; }
.data-contract dt:first-child { margin-top: 0; }
.data-contract dd { margin: 4px 0 0; color: var(--muted); }

.site-footer {
  padding: 34px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-inner p { margin: 0; }

/* Case studies */
.case-hero {
  padding: 72px 0 62px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.case-hero h1 { max-width: 960px; font-size: 46px; }
.case-hero .lead { max-width: 780px; margin-top: 20px; }

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 42px;
  border: 1px solid var(--line);
  background: var(--line);
}

.metric { min-height: 120px; padding: 20px; background: white; }
.metric strong { display: block; font-size: 25px; line-height: 1.2; }
.metric span { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }

.article {
  width: min(calc(100% - 40px), 900px);
  margin: 0 auto;
  padding: 72px 0 100px;
}

.article section { margin-top: 72px; }
.article section:first-child { margin-top: 0; }
.article h2 { font-size: 32px; }
.article h3 { margin-top: 32px; }
.article p, .article li { color: #424245; }
.article li + li { margin-top: 8px; }

.architecture {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 30px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.architecture .node {
  position: relative;
  min-height: 116px;
  padding: 18px 22px 18px 18px;
  border-right: 1px solid var(--line);
  background: white;
  font-size: 14px;
}

.architecture .node:last-child { border-right: 0; }
.architecture .node:not(:last-child)::after { content: "→"; position: absolute; right: 7px; top: 43px; color: var(--blue); }
.architecture strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 15px; }

pre {
  overflow-x: auto;
  padding: 22px;
  border-radius: 8px;
  color: #e5e7eb;
  background: var(--code);
  font: 14px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.inline-note { padding: 20px 22px; border-left: 3px solid var(--blue); background: #f1f7ff; }
.inline-note.warning { border-left-color: var(--orange); background: #fff7f2; }

.evidence {
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft);
}

.evidence img { width: 100%; }
.evidence figcaption { padding: 14px 18px; color: var(--muted); font-size: 14px; background: white; }

.media-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.media-shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.media-shot.wide { grid-column: 1 / -1; }

.media-shot img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: top center;
  background: var(--soft);
}

.media-shot.interface img { height: 380px; }
.media-shot.output img { height: auto; aspect-ratio: 16 / 9; }
.media-shot.compact img { height: 220px; object-fit: contain; padding: 18px; }

.media-shot figcaption {
  min-height: 94px;
  padding: 15px 18px 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  background: white;
}

.media-shot figcaption strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
}

.media-player {
  margin: 30px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.media-player h3 { margin: 0 0 6px; }
.media-player p { margin: 0 0 18px; color: var(--muted); }
.media-player audio, .media-player video { display: block; width: 100%; }
.media-player video { aspect-ratio: 16 / 9; background: #000; }

.media-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.media-facts strong { color: var(--ink); }

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.showcase-grid .media-shot { min-width: 0; }

.faq details { padding: 18px 0; border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; color: var(--ink); font-weight: 700; }
.faq details p { margin: 10px 0 0; }

@media (max-width: 860px) {
  .nav-links > a:not(.keep-mobile) { display: none; }
  h1 { font-size: 42px; }
  .hero { min-height: auto; padding: 64px 0 44px; }
  .workflow-list { grid-template-columns: 1fr; gap: 12px; }
  .workflow-list li { min-height: 36px; }
  .workflow-list li:not(:last-child)::after { content: "↓"; right: auto; left: 14px; top: 28px; }
  .section-head, .proof-layout, .cta, .contact-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .media-gallery, .showcase-grid { grid-template-columns: 1fr; }
  .media-shot.wide { grid-column: auto; }
  .logic-grid { grid-template-columns: 1fr 1fr; }
  .metric-row { grid-template-columns: 1fr 1fr; }
  .model-summary { grid-template-columns: 1fr; }
  .architecture { grid-template-columns: 1fr; }
  .architecture .node { border-right: 0; border-bottom: 1px solid var(--line); }
  .architecture .node:last-child { border-bottom: 0; }
  .architecture .node:not(:last-child)::after { content: "↓"; top: auto; right: 18px; bottom: -16px; z-index: 2; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav { width: min(calc(100% - 24px), var(--max)); gap: 12px; }
  .nav-links { gap: 10px; }
  .container, .article { width: min(calc(100% - 28px), var(--max)); }
  h1, .case-hero h1 { font-size: 35px; }
  h2 { font-size: 29px; }
  .hero-copy, .lead, .section-head p { font-size: 17px; }
  .band { padding: 68px 0; }
  .section-head { gap: 18px; margin-bottom: 30px; }
  .case-card { min-height: auto; padding: 20px; }
  .media-shot img, .media-shot.interface img { height: 240px; }
  .media-shot.output img { height: auto; }
  .media-shot.compact img { height: 190px; }
  .media-shot figcaption { min-height: auto; }
  .media-player { padding: 18px; }
  .logic-grid, .metric-row { grid-template-columns: 1fr; }
  .deep-links, .form-grid, .pro-con { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .button { width: 100%; }
  .toc ol { columns: 1; }
  .step-list > li { padding-left: 52px; }
  .io-line { grid-template-columns: 1fr; gap: 2px; }
  .metric { min-height: 92px; }
  .hero-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
