:root {
  --ink: #171915;
  --muted: #60645c;
  --paper: #f4f1e8;
  --paper-strong: #fffdf7;
  --line: rgba(23, 25, 21, 0.17);
  --accent: #d7ff43;
  --accent-deep: #a9dd00;
  --blue: #3857ff;
  --blue-soft: #e6eaff;
  --max: 1180px;
  --radius: 22px;
  --shadow: 0 18px 55px rgba(32, 35, 26, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 25, 21, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 21, 0.028) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 232, 0.9);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--accent);
  font: 900 18px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--paper-strong);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.nav-join {
  margin-left: 8px;
  background: var(--ink) !important;
  color: white !important;
  box-shadow: none !important;
}

.lang-switch {
  min-width: 38px;
  text-align: center;
  border: 1px solid var(--line);
  color: var(--ink) !important;
  font: 800 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace !important;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-strong);
  color: var(--ink);
  font-size: 20px;
}

main {
  overflow: hidden;
}

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

.hero {
  padding: clamp(72px, 11vw, 144px) 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: clamp(44px, 7vw, 92px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  color: var(--muted);
  font: 800 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-deep);
  content: "";
  box-shadow: 0 0 0 5px rgba(169, 221, 0, 0.18);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.03;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 900px;
  margin-bottom: 26px;
  font-size: clamp(48px, 7.8vw, 108px);
  font-weight: 850;
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(34px, 5vw, 66px);
}

h3 {
  margin-bottom: 13px;
  font-size: clamp(22px, 2.4vw, 31px);
}

.lede {
  max-width: 720px;
  margin-bottom: 30px;
  color: #454940;
  font-size: clamp(19px, 2.2vw, 27px);
  line-height: 1.38;
  letter-spacing: -0.02em;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--accent-deep);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.button.secondary:hover {
  background: var(--paper-strong);
}

.manifest-card {
  position: relative;
  transform: rotate(1.5deg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #1b1d19;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.manifest-card::after {
  position: absolute;
  width: 130px;
  height: 38px;
  top: -13px;
  right: 28px;
  transform: rotate(4deg);
  background: rgba(215, 255, 67, 0.75);
  content: "";
}

.code-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #daddd4;
  font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre;
}

.manifest-card pre,
.code-block pre {
  padding: 26px;
  color: #f2f5ec;
  font: 500 13px/1.72 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.code-key {
  color: var(--accent);
}

.code-value {
  color: #b8c5ff;
}

.section {
  padding: clamp(70px, 10vw, 128px) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 790px;
  margin-bottom: 48px;
}

.section-head p,
.body-copy {
  color: var(--muted);
  font-size: 18px;
}

.grid-3,
.grid-4,
.split-grid,
.actor-grid,
.principle-grid {
  display: grid;
  gap: 18px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4,
.actor-grid {
  grid-template-columns: repeat(4, 1fr);
}

.split-grid {
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(36px, 7vw, 90px);
}

.card {
  min-height: 100%;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.76);
  box-shadow: 0 10px 35px rgba(25, 27, 21, 0.035);
}

.card p:last-child,
.callout p:last-child {
  margin-bottom: 0;
}

.card-number {
  display: inline-grid;
  width: 39px;
  height: 39px;
  margin-bottom: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  font: 900 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

.actor-card {
  position: relative;
  padding-top: 72px;
}

.actor-card::before {
  position: absolute;
  top: 28px;
  left: 28px;
  color: var(--blue);
  font: 900 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  content: attr(data-symbol);
}

.band {
  background: var(--blue);
  color: white;
}

.band .eyebrow,
.band .section-head p {
  color: rgba(255, 255, 255, 0.72);
}

.band .eyebrow::before {
  background: var(--accent);
}

.band .card {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.band .card p {
  color: rgba(255, 255, 255, 0.73);
}

.statement {
  padding: clamp(36px, 6vw, 72px);
  border-radius: calc(var(--radius) + 10px);
  background: var(--accent);
}

.statement blockquote {
  max-width: 960px;
  margin: 0;
  font-size: clamp(32px, 5.2vw, 68px);
  font-weight: 820;
  line-height: 1.06;
  letter-spacing: -0.048em;
}

.page-hero {
  padding: clamp(72px, 10vw, 132px) 0 70px;
}

.page-hero h1 {
  max-width: 1020px;
  font-size: clamp(48px, 7vw, 92px);
}

.page-hero .lede {
  max-width: 840px;
}

.side-note {
  align-self: start;
  padding: 24px;
  border-left: 5px solid var(--accent-deep);
  background: var(--paper-strong);
}

.side-note strong {
  display: block;
  margin-bottom: 8px;
}

.prose {
  max-width: 780px;
}

.prose p,
.prose li {
  color: #4f534b;
  font-size: 18px;
}

.prose h2 {
  margin-top: 64px;
  font-size: clamp(32px, 4vw, 50px);
}

.prose h3 {
  margin-top: 38px;
  font-size: 25px;
}

.prose li + li {
  margin-top: 9px;
}

.principle-grid {
  grid-template-columns: repeat(2, 1fr);
}

.principle {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.principle strong {
  display: block;
  margin-bottom: 8px;
  font-size: 19px;
}

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

.spec-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(36px, 7vw, 88px);
  align-items: start;
}

.toc {
  position: sticky;
  top: 102px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.88);
}

.toc strong {
  display: block;
  margin-bottom: 13px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.toc a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.toc a:hover {
  color: var(--blue);
}

.field-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--ink);
}

.field-table th,
.field-table td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.field-table th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field-table code,
.inline-code {
  padding: 0.18em 0.42em;
  border-radius: 6px;
  background: var(--blue-soft);
  color: #1d36bc;
  font: 650 0.9em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.code-block {
  margin: 28px 0;
  border-radius: 18px;
  background: #1b1d19;
  overflow: hidden;
}

.copy-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: transparent;
  color: white;
  padding: 7px 11px;
  font: 700 11px/1 ui-sans-serif, sans-serif;
  cursor: pointer;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.example-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 30px;
  padding: 38px 0;
  border-top: 1px solid var(--line);
}

.example-grid:last-child {
  border-bottom: 1px solid var(--line);
}

.example-steps {
  display: grid;
  align-self: start;
  gap: 14px;
}

.example-steps .card {
  min-height: 0;
}

.example-meta {
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-strong);
  font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.callout {
  padding: 30px;
  border-radius: var(--radius);
  background: var(--blue-soft);
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 28px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--accent);
}

.contact-card span {
  color: #4d5540;
  font: 800 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-card strong {
  font-size: 20px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-left: auto;
}

.contact-links a {
  font-weight: 800;
}

.join-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: end;
  padding: clamp(34px, 6vw, 70px);
  border-radius: calc(var(--radius) + 10px);
  background: var(--ink);
  color: white;
}

.join-panel p {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
}

.join-panel .button {
  background: var(--accent);
  color: var(--ink);
  justify-self: end;
}

.site-footer {
  padding: 44px 0 54px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: end;
}

.footer-note {
  max-width: 600px;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-contact {
  display: inline-block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.footer-contact-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 920px) {
  .hero-grid,
  .split-grid,
  .join-panel,
  .example-grid {
    grid-template-columns: 1fr;
  }

  .grid-3,
  .grid-4,
  .actor-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .spec-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .join-panel .button {
    justify-self: start;
  }

  .manifest-card {
    max-width: 660px;
    transform: none;
  }
}

@media (max-width: 720px) {
  .nav-wrap {
    width: min(calc(100% - 28px), var(--max));
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    right: 14px;
    left: 14px;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--paper-strong);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    padding: 12px 14px;
  }

  .nav-join {
    margin: 4px 0 0;
    text-align: center;
  }

  .lang-switch {
    margin-top: 4px;
  }

  .container {
    width: min(calc(100% - 28px), var(--max));
  }

  h1 {
    font-size: clamp(43px, 14vw, 70px);
  }

  .grid-3,
  .grid-4,
  .actor-grid,
  .principle-grid {
    grid-template-columns: 1fr;
  }

  .field-table {
    display: block;
    overflow-x: auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .contact-links {
    width: 100%;
    margin-left: 0;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
