:root {
  --bg: #f4f7f8;
  --ink: #17222c;
  --muted: #5c6e7c;
  --line: #d9e2e8;
  --steel: #3e647f;
  --steel-deep: #2c4c62;
  --paper: #ffffff;
  --graphite: #141b23;
  --mist: #e7eef3;
  --serif: "Instrument Serif", "Iowan Old Style", Palatino, serif;
  --sans: Outfit, "Avenir Next", "PingFang SC", "Noto Sans SC", sans-serif;
  --shadow: 0 30px 70px rgba(20, 27, 35, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
main [id] { scroll-margin-top: 96px; }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 80% -10%, #e4eef4 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 420;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.nav {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 7vw;
  background: rgba(244, 247, 248, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 560;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
}
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  margin-left: 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 520;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--graphite);
  color: #f4f7f8;
}

.hero {
  padding: 88px 7vw 28px;
  max-width: 980px;
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--steel);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 8vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.03em;
}
h1 em { font-style: italic; color: var(--steel-deep); }
.lede {
  max-width: 640px;
  margin: 28px 0 0;
  font-size: 18px;
  color: var(--muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
}
.button.primary { background: var(--steel); color: white; }
.button.primary:hover { background: var(--steel-deep); }
.button.quiet { border: 1px solid var(--line); background: transparent; }

.stage {
  margin: 28px 7vw 0;
}
.window {
  background: var(--graphite);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 8px 8px;
  color: #8ea0ae;
  font-size: 12px;
}
.window-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #31414e;
}
.window-bar strong {
  margin-left: 8px;
  font-weight: 500;
  color: #d5e1ea;
}
.window img {
  width: 100%;
  border-radius: 10px;
  background: white;
}
.layers {
  margin: 72px 7vw 0;
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) 1.2fr;
  gap: 48px;
  align-items: start;
}
.layers-intro p:last-child {
  color: var(--muted);
  font-size: 17px;
}
.layers ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.layers li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.layers li > span {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--steel);
}
.layers h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 560;
}
.layers li p { margin: 0; color: var(--muted); }
.layers code {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.92em;
  color: var(--ink);
}
.points code {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.92em;
  color: var(--ink);
}
.stage figcaption {
  margin: 14px 4px 0;
  color: var(--muted);
  font-size: 14px;
}

.workflow { margin: 76px 7vw 0; }
.workflow-heading { max-width: 560px; }
.workflow-heading h2 {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.workflow-grid article { padding: 22px 24px 26px 0; }
.workflow-grid article + article { padding-left: 24px; border-left: 1px solid var(--line); }
.workflow-grid article > span { color: var(--steel); font-family: var(--serif); font-size: 20px; }
.workflow-grid h3 { margin: 8px 0 6px; font-size: 18px; font-weight: 560; }
.workflow-grid p { max-width: 320px; margin: 0; color: var(--muted); font-size: 14px; }

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 72px 7vw 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.facts article {
  padding: 28px 24px 32px;
  border-right: 1px solid var(--line);
}
.facts article:last-child { border-right: none; }
.facts p, .index, .split p:first-child {
  margin: 0;
  color: var(--steel);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.facts h2, .chapter h2, .local h2, .layers h2 {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.chapter, .local {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  margin: 0 7vw;
  padding: 96px 0;
  border-bottom: 1px solid var(--line);
}
.chapter-copy p:last-child, .local p:last-of-type {
  color: var(--muted);
  font-size: 17px;
  max-width: 460px;
}
.points { list-style: none; margin: 0; padding: 8px 0 0; }
.points li + li { margin-top: 22px; }
.points strong { display: block; font-weight: 560; }
.points span { color: var(--muted); }

.split { display: grid; gap: 16px; }
.split article {
  padding: 24px;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.split h3 {
  margin: 8px 0;
  font-size: 22px;
  font-weight: 520;
  letter-spacing: -0.02em;
}
.split article p:last-child { margin: 0; color: var(--muted); }

.local { background: transparent; }
.local ul { margin: 8px 0 0; padding: 0; list-style: none; }
.local li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 16px;
}
.download {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin: 0 7vw;
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}
.download h2 {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.12;
}
.download p:not(.index) { max-width: 460px; margin: 14px 0 0; color: var(--muted); font-size: 16px; }
.download-action { display: grid; justify-items: start; gap: 8px; flex: 0 0 auto; }
.download-action span { color: var(--muted); font-size: 12px; }
.path {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.92em;
  color: var(--ink);
}

footer {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 36px 7vw 48px;
  color: var(--muted);
}
footer div { display: flex; align-items: center; gap: 10px; color: var(--ink); }
footer img { border-radius: 9px; }
footer p { margin: 0; }
footer a { margin-left: auto; color: var(--steel-deep); }

@media (max-width: 860px) {
  .nav { flex-wrap: wrap; gap: 10px 16px; padding: 12px 5vw 8px; }
  .nav-links {
    order: 3;
    width: 100%;
    margin: 0;
    gap: 20px;
    overflow-x: auto;
    padding: 2px 0 5px;
    white-space: nowrap;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex: 0 0 auto; }
  .nav-cta { margin-left: auto; }
  .facts, .chapter, .local, .download, .layers { grid-template-columns: 1fr; gap: 28px; }
  .workflow-grid { grid-template-columns: 1fr; }
  .workflow-grid article, .workflow-grid article + article { padding: 18px 0; border-left: none; }
  .workflow-grid article + article { border-top: 1px solid var(--line); }
  .facts article { border-right: none; border-bottom: 1px solid var(--line); }
  .facts article:last-child { border-bottom: none; }
  .chapter, .local, .download { padding: 64px 0; }
  .download { display: grid; align-items: start; }
  footer { flex-wrap: wrap; }
  footer a { margin-left: 0; }
}

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