:root {
  --linen: #f3eee6;
  --indigo: #2c3a6b;
  --rust: #a65a3a;
  --beam: #1e1a16;
  --thread: #d4cbbe;
  --shuttle: #5b7a6a;
  --linen-deep: #e7dfd2;
  --ink: #2a241e;
  --muted: #5c554c;
  --paper: #faf7f2;
  --max: 1160px;
  --radius: 10px;
  --header: 72px;
  --font-display: "Figtree", "Source Sans 3", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-serif: "Source Serif 4", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--linen);
}

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

a {
  color: var(--indigo);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--beam);
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.5rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

code,
pre {
  font-family: var(--font-mono);
  font-size: 0.86em;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--indigo);
  color: var(--linen);
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 80;
}

.skip:focus {
  top: 12px;
}

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

.selvedge {
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--indigo) 0 28px,
    var(--rust) 28px 56px
  );
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(243, 238, 230, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--thread);
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(30, 26, 22, 0.06);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--header);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--beam);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.wordmark:hover {
  color: var(--indigo);
}

.wordmark svg {
  flex-shrink: 0;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.desktop-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
  color: var(--indigo);
}

.header-cta {
  margin-left: 8px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--thread);
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--beam);
  border-radius: 2px;
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
}

.menu-toggle span::before {
  top: -7px;
}

.menu-toggle span::after {
  top: 7px;
}

.mobile-nav {
  display: none;
  padding: 8px 0 20px;
  border-top: 1px solid var(--thread);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: var(--indigo);
  color: var(--linen);
}

.btn-primary:hover {
  background: var(--rust);
  color: var(--linen);
}

.btn-secondary {
  background: transparent;
  color: var(--rust);
  border-color: var(--rust);
}

.btn-secondary:hover {
  background: var(--rust);
  color: var(--linen);
}

.btn-ghost {
  background: transparent;
  color: var(--linen);
  border-color: rgba(243, 238, 230, 0.35);
}

.btn-ghost:hover {
  background: var(--rust);
  color: var(--linen);
  border-color: var(--rust);
}

.hero {
  position: relative;
  padding: 72px 0 88px;
  overflow: hidden;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 23px,
    var(--thread) 23px 24px
  );
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: start;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 14px;
}

.lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 42rem;
}

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

.hero-stage {
  display: grid;
  gap: 16px;
}

.code-well {
  background: var(--paper);
  border: 1px solid var(--thread);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow: auto;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.code-well pre {
  margin: 0;
  text-align: left;
  color: var(--beam);
  line-height: 1.55;
  white-space: pre;
}

.code-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--shuttle);
  margin-bottom: 10px;
}

.kw {
  color: var(--indigo);
}

.str {
  color: var(--rust);
}

.cmt {
  color: var(--shuttle);
}

.shed {
  border: 1px solid var(--thread);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 18px 18px 14px;
  position: relative;
  overflow: hidden;
}

.shed-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 12px;
}

.warp-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  position: relative;
  min-height: 132px;
}

.warp-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.warp-end .thread-line {
  width: 4px;
  flex: 1;
  min-height: 72px;
  border-radius: 99px;
  background: var(--indigo);
}

.warp-end:nth-child(2) .thread-line,
.warp-end:nth-child(4) .thread-line {
  background: var(--shuttle);
}

.warp-end span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.weft {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 46%;
  height: 3px;
  border-radius: 99px;
  background: var(--rust);
  transform: translateX(-120%);
  opacity: 0;
}

.shed.is-weaving .warp-end:nth-child(1) .thread-line,
.shed.is-weaving .warp-end:nth-child(3) .thread-line {
  animation: lift-shed 2.2s ease-out 1 both;
}

.shed.is-weaving .weft {
  animation: weft-pass 2.2s ease-out 1 both;
}

@keyframes lift-shed {
  0%,
  14% {
    transform: translateY(0);
  }
  30%,
  70% {
    transform: translateY(-8px);
  }
  88%,
  100% {
    transform: translateY(0);
  }
}

@keyframes weft-pass {
  0%,
  26% {
    transform: translateX(-120%);
    opacity: 0;
  }
  32% {
    opacity: 1;
  }
  68% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

.section {
  padding: 72px 0;
}

.section-tight {
  padding: 48px 0;
}

.section-dark {
  background: var(--indigo);
  color: var(--linen);
}

.section-dark h2,
.section-dark h3 {
  color: var(--linen);
}

.section-muted {
  background: var(--linen-deep);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 32px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.swatch {
  background: var(--linen);
  border: 1px solid var(--thread);
  border-top: 3px solid var(--indigo);
  border-radius: var(--radius);
  padding: 22px;
}

.swatch h3 {
  margin-bottom: 8px;
}

.swatch p,
.swatch li {
  color: var(--muted);
}

.list-plain {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-plain li {
  padding: 8px 0;
  border-bottom: 1px solid var(--thread);
}

.list-plain li:last-child {
  border-bottom: 0;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.heddle-art {
  justify-self: center;
}

.quote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

blockquote {
  margin: 0;
  font-size: 1.2rem;
  font-family: var(--font-display);
  line-height: 1.4;
  color: var(--beam);
}

blockquote cite {
  display: block;
  margin-top: 14px;
  font-style: normal;
  font-size: 0.88rem;
  color: var(--muted);
  font-family: var(--font-body);
}

.page-hero {
  padding: 56px 0 28px;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 23px,
    var(--thread) 23px 24px
  );
}

.page-hero h1 {
  max-width: 18ch;
}

.anchor {
  scroll-margin-top: calc(var(--header) + 20px);
}

.meter {
  height: 10px;
  background: var(--thread);
  border-radius: 99px;
  overflow: hidden;
  margin: 10px 0 8px;
}

.meter span {
  display: block;
  height: 100%;
  background: var(--shuttle);
  border-radius: inherit;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--indigo);
  border: 1px solid var(--thread);
  border-radius: 99px;
  padding: 6px 10px;
  text-decoration: none;
  background: var(--paper);
}

.chip:hover {
  color: var(--rust);
  border-color: var(--rust);
}

.plan {
  background: var(--linen);
  border: 1px solid var(--thread);
  border-top: 3px solid var(--indigo);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan.is-featured {
  border-top: 6px solid var(--rust);
  background: var(--paper);
  box-shadow: 0 16px 40px rgba(30, 26, 22, 0.08);
}

.plan .price {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--beam);
  letter-spacing: -0.03em;
}

.plan .price small {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
}

.plan ul {
  margin: 0 0 12px;
  padding-left: 1.1em;
  color: var(--muted);
  flex: 1;
}

.plan .btn {
  width: 100%;
}

.toc {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: start;
}

.toc-nav {
  position: sticky;
  top: calc(var(--header) + 16px);
  display: grid;
  gap: 8px;
}

.toc-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.doc-block {
  margin-bottom: 48px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--thread);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--thread);
  vertical-align: top;
}

th {
  font-family: var(--font-display);
  font-weight: 600;
  background: var(--linen-deep);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--shuttle);
  margin-right: 8px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.person {
  padding: 20px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--linen);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 14px;
}

.person h3 {
  margin-bottom: 2px;
}

.role {
  color: var(--rust);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.form {
  display: grid;
  gap: 14px;
  max-width: 560px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 500;
  font-size: 0.92rem;
}

input,
select,
textarea {
  font: inherit;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--thread);
  background: var(--paper);
  color: var(--ink);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.btn:focus-visible,
.menu-toggle:focus-visible,
a:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
}

.form-success {
  background: var(--paper);
  border: 1px solid var(--shuttle);
  border-top: 3px solid var(--shuttle);
  border-radius: var(--radius);
  padding: 22px;
  max-width: 560px;
}

.legal {
  color: var(--muted);
  font-size: 0.95rem;
}

.legal h3 {
  margin-top: 28px;
}

.note {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--indigo);
}

.article {
  max-width: 42rem;
}

.article + .article {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--thread);
}

.meta {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.site-footer {
  background: var(--beam);
  color: #d9d0c4;
}

.site-footer a {
  color: #d9d0c4;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--rust);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 42px 0 28px;
  min-height: 250px;
}

.footer-brand p {
  margin-top: 10px;
  max-width: 22ch;
}

.footer-brand strong {
  font-family: var(--font-display);
  color: var(--linen);
  font-size: 1.15rem;
}

.footer-col h4 {
  color: var(--linen);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  font-size: 0.92rem;
}

.footer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 0 0 22px;
  border-top: 1px solid rgba(212, 203, 190, 0.18);
  padding-top: 18px;
}

.footer-chips a {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: baseline;
  padding: 16px 0 28px;
  border-top: 1px solid rgba(212, 203, 190, 0.18);
  font-size: 12px;
}

.legal-rail .kyc {
  flex-basis: 100%;
  color: #9c9488;
}

@media (max-width: 960px) {
  .hero-grid,
  .split,
  .toc,
  .footer-grid,
  .grid-4,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .grid-3,
  .quote-grid,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .toc-nav {
    position: static;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 780px) {
  .desktop-nav,
  .header-cta {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav.is-open {
    display: block;
  }

  .hero,
  .section {
    padding: 48px 0;
  }

  .header-bar {
    min-height: 64px;
  }
}

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

  .shed.is-weaving .warp-end .thread-line,
  .shed.is-weaving .weft {
    animation: none;
  }

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