:root {
  --ink: #13201d;
  --ink-strong: #07110f;
  --ink-soft: #465852;
  --muted: #6b7873;
  --paper: #f7f3ea;
  --paper-light: #fffdfa;
  --green: #173d34;
  --green-soft: #dce8e2;
  --blue-grey: #6f8586;
  --ember: #c95236;
  --line: rgba(19, 32, 29, 0.18);
  --line-strong: rgba(19, 32, 29, 0.72);
  --max-width: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(19, 32, 29, 0.04) 1px, transparent 1px) 0 0 / 96px 96px,
    var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ember);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(201, 82, 54, 0.32);
  outline-offset: 4px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.site-header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-strong);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--paper-light);
  background: var(--green);
  border: 2px solid var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup strong {
  font-size: 15px;
  line-height: 1.1;
}

.brand-lockup small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--ink-soft);
  font-size: 14px;
}

.site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.language-switch {
  min-width: 44px;
  min-height: 38px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  font: inherit;
  cursor: not-allowed;
}

.hero {
  padding: clamp(42px, 7vw, 78px) 0 clamp(56px, 8vw, 96px);
  border-bottom: 1px solid var(--line-strong);
}

.hero-label {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: uppercase;
}

.hero-label span {
  padding: 12px 0;
}

.hero-label span + span {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(32px, 6vw, 82px);
  align-items: end;
  padding: clamp(44px, 8vw, 92px) 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--ember);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  max-width: 900px;
  font-size: 92px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.02;
}

h1 span {
  display: inline-block;
  margin-top: 10px;
  color: var(--green);
  font-size: 0.48em;
  font-weight: 720;
}

h2 {
  font-size: 58px;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.08;
}

h3 {
  font-size: 28px;
  line-height: 1.12;
}

.hero-aside {
  border-top: 3px solid var(--ink);
  padding-top: 20px;
}

.hero-aside p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.78;
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
}

.button.primary {
  color: var(--paper-light);
  background: var(--ink);
}

.button.primary:hover {
  color: var(--paper-light);
  background: var(--ember);
  border-color: var(--ember);
}

.button.secondary:hover {
  border-color: var(--ember);
}

.studio-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  min-height: 340px;
  border: 1px solid var(--line-strong);
  background: var(--paper-light);
}

.map-canvas {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  background:
    linear-gradient(rgba(19, 32, 29, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 32, 29, 0.07) 1px, transparent 1px),
    radial-gradient(circle at 24% 26%, rgba(201, 82, 54, 0.16), transparent 24%),
    radial-gradient(circle at 78% 68%, rgba(111, 133, 134, 0.22), transparent 26%);
  background-size: 42px 42px, 42px 42px, auto, auto;
}

.map-canvas::before {
  position: absolute;
  inset: 34px;
  border: 2px solid var(--ink);
  content: "";
}

.map-caption {
  position: absolute;
  right: 22px;
  bottom: 18px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.map-rule,
.map-thread,
.map-pin {
  position: absolute;
  display: block;
}

.map-rule {
  background: rgba(19, 32, 29, 0.28);
}

.rule-one {
  top: 34px;
  left: 32%;
  width: 1px;
  height: calc(100% - 68px);
}

.rule-two {
  top: 57%;
  left: 34px;
  width: calc(100% - 68px);
  height: 1px;
}

.map-thread {
  height: 2px;
  transform-origin: left center;
  background: var(--green);
}

.thread-one {
  top: 26%;
  left: 27%;
  width: 43%;
  transform: rotate(12deg);
}

.thread-two {
  top: 42%;
  left: 34%;
  width: 38%;
  transform: rotate(54deg);
  background: var(--ember);
}

.thread-three {
  bottom: 28%;
  left: 22%;
  width: 58%;
  transform: rotate(-8deg);
}

.map-pin {
  display: grid;
  min-width: 62px;
  min-height: 62px;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.pin-lab {
  top: 17%;
  left: 17%;
  background: var(--ink);
  color: var(--paper-light);
}

.pin-godot {
  top: 30%;
  right: 18%;
  background: var(--green-soft);
}

.pin-app {
  bottom: 17%;
  left: 29%;
  background: var(--ember);
  color: var(--paper-light);
}

.pin-studio {
  right: 20%;
  bottom: 22%;
  background: var(--paper-light);
}

.map-ledger {
  display: grid;
  margin: 0;
  border-left: 1px solid var(--line-strong);
}

.map-ledger div {
  padding: 28px 24px;
}

.map-ledger div + div {
  border-top: 1px solid var(--line);
}

.map-ledger span,
.work-item span,
.project-code,
.project-row em,
.studio-facts dt,
.site-footer {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.map-ledger strong {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.12;
}

.map-ledger p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.section {
  padding: clamp(62px, 9vw, 112px) 0;
  border-bottom: 1px solid var(--line-strong);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.work-heading {
  display: grid;
  grid-template-columns: minmax(280px, 0.58fr) minmax(0, 1fr);
  gap: clamp(30px, 6vw, 78px);
  align-items: end;
  margin-bottom: 38px;
}

.work-heading p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 21px;
  line-height: 1.8;
}

.work-index {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 0.9fr;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.work-item {
  min-height: 260px;
  padding: 24px;
  background: rgba(255, 253, 250, 0.58);
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.lead-work {
  grid-row: span 2;
  min-height: 520px;
  background: var(--green);
  color: var(--paper-light);
}

.wide-work {
  grid-column: span 2;
  background: var(--paper-light);
}

.work-item span {
  display: block;
  margin-bottom: 48px;
  color: var(--ember);
}

.lead-work span,
.lead-work p {
  color: rgba(255, 253, 250, 0.72);
}

.lead-work h3 {
  max-width: 9ch;
  font-size: 50px;
}

.work-item p {
  margin: 18px 0 0;
  color: var(--ink-soft);
  line-height: 1.75;
}

.lead-work p {
  max-width: 360px;
  color: rgba(255, 253, 250, 0.78);
  font-size: 19px;
}

.project-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 82px);
  align-items: start;
}

.project-heading {
  position: sticky;
  top: 22px;
  margin-bottom: 0;
}

.project-heading p:last-child {
  margin: 22px 0 0;
  color: var(--ink-soft);
  line-height: 1.8;
}

.project-index {
  border-top: 2px solid var(--ink);
}

.project-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) minmax(210px, 0.38fr);
  gap: 24px;
  align-items: center;
  min-height: 166px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line-strong);
  text-decoration: none;
}

.project-row:hover {
  background: linear-gradient(90deg, rgba(220, 232, 226, 0.42), transparent 62%);
}

.project-row:hover strong,
.project-row:hover em {
  color: var(--ember);
}

.project-code {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border: 2px solid var(--ink);
  color: var(--green);
  background: var(--paper-light);
}

.project-row strong,
.project-row small,
.project-row em {
  display: block;
}

.project-row strong {
  font-size: 38px;
  line-height: 1.05;
}

.project-row small {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}

.project-row em {
  justify-self: end;
  color: var(--green);
  font-style: normal;
}

.studio-note {
  display: grid;
  grid-template-columns: minmax(260px, 0.6fr) minmax(0, 1fr);
  gap: clamp(30px, 6vw, 74px);
  align-items: start;
}

.note-copy {
  border-top: 3px solid var(--ink);
  padding-top: 22px;
}

.note-copy > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 24px;
  line-height: 1.75;
}

.studio-facts {
  display: grid;
  grid-template-columns: 0.7fr 1.6fr 1fr;
  margin: 34px 0 0;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.studio-facts div {
  padding: 18px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.studio-facts dt {
  margin-bottom: 8px;
}

.studio-facts dd {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: clamp(48px, 7vw, 74px) 0;
  border-bottom: 1px solid var(--line-strong);
}

.contact-band h2 {
  max-width: 850px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 28px 0 36px;
  line-height: 1.6;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 18px;
}

.legal-page {
  min-height: 100vh;
}

.legal-main {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(54px, 8vw, 92px) 0 90px;
}

.legal-main h1 {
  font-size: 70px;
}

.legal-main .updated {
  margin: 18px 0 40px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.legal-section {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.legal-section p,
.legal-section li {
  color: var(--ink-soft);
  line-height: 1.9;
}

.legal-section ul {
  margin: 12px 0 0;
  padding-left: 1.2em;
}

.not-found {
  display: grid;
  min-height: 72vh;
  align-items: center;
}

.hero-lead {
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 21px;
  line-height: 1.8;
}

@media (max-width: 940px) {
  h1 {
    font-size: 76px;
  }

  h2 {
    font-size: 48px;
  }

  h3 {
    font-size: 26px;
  }

  .project-row strong {
    font-size: 34px;
  }

  .note-copy > p {
    font-size: 21px;
  }

  .legal-main h1 {
    font-size: 56px;
  }

  .hero-lead {
    font-size: 19px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 12px;
  }

  .hero-label,
  .hero-layout,
  .studio-map,
  .work-heading,
  .project-section,
  .studio-note,
  .contact-band {
    grid-template-columns: 1fr;
  }

  .hero-label span + span,
  .map-ledger,
  .work-index {
    border-left: 0;
  }

  .hero-label span + span {
    padding-left: 0;
  }

  .map-ledger {
    border-top: 1px solid var(--line-strong);
  }

  .work-index {
    grid-template-columns: 1fr 1fr;
  }

  .lead-work {
    grid-row: auto;
    min-height: 340px;
  }

  .wide-work {
    grid-column: span 2;
  }

  .project-heading {
    position: static;
  }

  .studio-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: 44px;
  }

  h2 {
    font-size: 34px;
  }

  h3 {
    font-size: 22px;
  }

  .project-row strong {
    font-size: 28px;
  }

  .note-copy > p {
    font-size: 18px;
  }

  .legal-main h1 {
    font-size: 38px;
  }

  .hero-lead {
    font-size: 17px;
  }

  .site-header,
  main,
  .site-footer,
  .legal-main {
    width: min(100% - 28px, var(--max-width));
  }

  .site-header {
    gap: 14px;
    padding-top: 16px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .site-nav {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 2px;
  }

  .hero-label {
    display: none;
  }

  .hero-layout {
    padding: 32px 0 38px;
  }

  h1 span {
    margin-top: 8px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .button {
    min-height: 50px;
    padding-inline: 14px;
  }

  .map-canvas {
    min-height: 230px;
  }

  .map-canvas::before {
    inset: 20px;
  }

  .map-rule,
  .map-thread {
    display: none;
  }

  .map-pin {
    min-width: 54px;
    min-height: 54px;
  }

  .pin-lab {
    top: 18%;
    left: 12%;
  }

  .pin-godot {
    top: 25%;
    right: 10%;
  }

  .pin-app {
    bottom: 16%;
    left: 20%;
  }

  .pin-studio {
    right: 12%;
    bottom: 22%;
  }

  .map-caption {
    right: 16px;
    bottom: 14px;
  }

  .work-index {
    grid-template-columns: 1fr;
  }

  .work-item,
  .lead-work,
  .wide-work {
    grid-column: auto;
    grid-row: auto;
    min-height: auto;
    padding: 22px 18px;
    border-left: 0;
  }

  .lead-work h3 {
    font-size: 30px;
  }

  .work-item span {
    margin-bottom: 18px;
  }

  .project-row {
    grid-template-columns: 58px minmax(0, 1fr);
    min-height: auto;
  }

  .project-row em {
    grid-column: 2;
    justify-self: start;
  }

  .studio-facts div {
    padding: 16px;
  }

  .site-footer {
    display: grid;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}
