:root {
  color-scheme: light;
  --ink: #11130f;
  --paper: #f7f3e8;
  --cream: #fffaf0;
  --soft: #ebe2d0;
  --line: #cfc2aa;
  --line-dark: #8a7d66;
  --green: #1d7355;
  --blue: #245f9f;
  --red: #a93f32;
  --amber: #b36b1c;
  --steel: #303843;
  --muted: #6e695f;
  --shadow: 0 24px 70px rgba(17, 19, 15, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Avenir Next", "Gill Sans", "PingFang SC", "Hiragino Sans GB", sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(90deg, rgba(17, 19, 15, 0.052) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(rgba(17, 19, 15, 0.04) 1px, transparent 1px) 0 0 / 48px 48px,
    radial-gradient(circle at 18% 0%, rgba(179, 107, 28, 0.16), transparent 34%),
    var(--paper);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.42;
  background-image:
    repeating-linear-gradient(115deg, transparent 0 18px, rgba(17, 19, 15, 0.03) 18px 19px),
    linear-gradient(rgba(255, 250, 240, 0.5), rgba(235, 226, 208, 0.12));
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  padding: 0 0.28em;
  border: 1px solid rgba(138, 125, 102, 0.34);
  border-radius: 4px;
  background: rgba(255, 250, 240, 0.72);
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(860px, 88vh);
  padding: 22px clamp(16px, 4vw, 64px) 28px;
  overflow: hidden;
  color: #fffaf0;
  background: #11130f;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.85) contrast(1.05);
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 19, 15, 0.96) 0%, rgba(17, 19, 15, 0.82) 38%, rgba(17, 19, 15, 0.28) 100%),
    linear-gradient(180deg, rgba(17, 19, 15, 0.2) 0%, rgba(17, 19, 15, 0.24) 55%, rgba(17, 19, 15, 0.88) 100%);
}

.masthead {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 42px;
}

.brand,
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(255, 250, 240, 0.24);
  border-radius: 8px;
  background: rgba(17, 19, 15, 0.46);
  backdrop-filter: blur(14px);
}

.brand {
  gap: 10px;
  padding: 5px 12px 5px 7px;
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.brand img {
  display: block;
  border-radius: 6px;
}

.nav-link {
  padding: 0 14px;
  color: rgba(255, 250, 240, 0.82);
  font-size: 13px;
  font-weight: 700;
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(780px, 94vw);
  padding: clamp(56px, 9vh, 120px) 0 clamp(34px, 7vh, 84px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: currentColor;
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: rgba(255, 250, 240, 0.68);
}

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

h1 {
  max-width: 11ch;
  margin-bottom: 22px;
  font-family: "Iowan Old Style", "Songti SC", "STSong", serif;
  font-size: clamp(54px, 10vw, 132px);
  font-weight: 900;
  line-height: 0.88;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.lede {
  width: min(650px, 100%);
  margin: 0;
  color: rgba(255, 250, 240, 0.86);
  font-size: clamp(18px, 2.2vw, 27px);
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.hero-ledger {
  position: relative;
  z-index: 1;
  align-self: end;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(255, 250, 240, 0.24);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(17, 19, 15, 0.52);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.hero-ledger div {
  display: grid;
  gap: 7px;
  min-height: 92px;
  padding: 16px;
  border-right: 1px solid rgba(255, 250, 240, 0.18);
}

.hero-ledger div:last-child {
  border-right: 0;
}

.hero-ledger span {
  color: rgba(255, 250, 240, 0.58);
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.hero-ledger strong {
  max-width: 28ch;
  font-size: clamp(15px, 1.55vw, 21px);
  line-height: 1.25;
}

.principle-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--cream);
}

.principle-strip article {
  display: grid;
  align-content: start;
  min-height: 260px;
  padding: clamp(20px, 3vw, 38px);
  border-right: 1px solid var(--ink);
}

.principle-strip article:last-child {
  border-right: 0;
}

.principle-strip span,
.flow-index {
  width: fit-content;
  min-width: 38px;
  padding: 4px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--red);
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.principle-strip h2 {
  margin: 18px 0 12px;
  font-family: "Iowan Old Style", "Songti SC", "STSong", serif;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.02;
}

.principle-strip p,
.loop-heading p,
.context-copy p,
.boundary-grid p,
.closing-section p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.loop-section,
.mapping-section,
.context-section,
.boundary-section,
.closing-section {
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
}

.loop-section {
  padding: clamp(74px, 10vw, 138px) 0 clamp(54px, 8vw, 104px);
}

.section-kicker {
  color: var(--green);
}

.loop-heading {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(320px, 0.52fr);
  gap: clamp(28px, 6vw, 86px);
  align-items: end;
  margin-bottom: 42px;
}

.loop-heading h2,
.mapping-section > h2,
.context-copy h2,
.boundary-section h2,
.closing-section h2 {
  margin-bottom: 0;
  font-family: "Iowan Old Style", "Songti SC", "STSong", serif;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
}

.flowline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: var(--cream);
  box-shadow: var(--shadow);
}

.flowline::before {
  position: absolute;
  top: 48px;
  left: 8%;
  right: 8%;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--red), var(--amber), var(--green), var(--blue));
}

.flowline article {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 310px;
  padding: 28px;
  border-right: 1px solid var(--line-dark);
}

.flowline article:last-child {
  border-right: 0;
}

.flowline h3 {
  margin: 46px 0 0;
  color: var(--steel);
  font-size: 23px;
  line-height: 1.15;
}

.flowline p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.58;
}

.mapping-section {
  padding: clamp(50px, 8vw, 92px) 0;
}

.mapping-section > h2 {
  max-width: 780px;
  margin-bottom: 34px;
}

.mapping-table {
  border: 1px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: var(--cream);
  box-shadow: var(--shadow);
}

.table-head,
.mapping-table article {
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) minmax(280px, 1.15fr) minmax(250px, 0.95fr);
}

.table-head {
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
}

.table-head span {
  padding: 12px 16px;
  border-right: 1px solid rgba(255, 250, 240, 0.22);
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.mapping-table article {
  border-bottom: 1px solid var(--line);
}

.mapping-table article:last-child {
  border-bottom: 0;
}

.mapping-table h3,
.mapping-table p {
  margin: 0;
  padding: 18px 16px;
  border-right: 1px solid var(--line);
}

.mapping-table h3 {
  font-size: 18px;
  line-height: 1.3;
}

.mapping-table p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
}

.mapping-table h3:last-child,
.mapping-table p:last-child,
.table-head span:last-child {
  border-right: 0;
}

.context-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.62fr) minmax(320px, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  padding: clamp(70px, 8vw, 112px) 0;
}

.context-copy {
  position: sticky;
  top: 24px;
}

.context-copy h2 {
  margin-bottom: 18px;
}

.context-ladder {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ladder;
}

.context-ladder li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(88px, 0.24fr) minmax(190px, 0.48fr) minmax(240px, 1fr);
  gap: 16px;
  align-items: start;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.82);
}

.context-ladder li::before {
  position: absolute;
  top: 18px;
  right: 18px;
  counter-increment: ladder;
  content: "0" counter(ladder);
  color: rgba(17, 19, 15, 0.18);
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.context-ladder span {
  color: var(--red);
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.context-ladder strong {
  color: var(--steel);
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: clamp(15px, 1.7vw, 20px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.context-ladder p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.58;
}

.boundary-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.46fr) minmax(340px, 1fr);
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(64px, 8vw, 110px) 0;
  border-top: 1px solid var(--ink);
}

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

.boundary-grid article {
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: var(--cream);
}

.boundary-grid h3 {
  margin-bottom: 12px;
  color: var(--steel);
  font-size: 23px;
  line-height: 1.18;
}

.closing-section {
  margin-bottom: clamp(32px, 6vw, 80px);
  padding: clamp(34px, 6vw, 72px);
  border: 1px solid var(--ink);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(29, 115, 85, 0.18), transparent 32%),
    linear-gradient(90deg, var(--cream), #efe3cd);
  box-shadow: var(--shadow);
}

.closing-section h2 {
  margin-bottom: 14px;
  font-size: clamp(42px, 7vw, 88px);
}

.closing-section p:last-child {
  width: min(920px, 100%);
  color: var(--steel);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
}

@media (max-width: 1080px) {
  .principle-strip,
  .flowline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .principle-strip article:nth-child(2),
  .flowline article:nth-child(2) {
    border-right: 0;
  }

  .principle-strip article:nth-child(-n + 2),
  .flowline article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--ink);
  }

  .loop-heading,
  .context-section,
  .boundary-section {
    grid-template-columns: 1fr;
  }

  .context-copy {
    position: static;
  }

  .table-head,
  .mapping-table article {
    grid-template-columns: minmax(180px, 0.72fr) minmax(230px, 1fr) minmax(210px, 0.92fr);
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 86vh;
    padding: 14px 12px 20px;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(17, 19, 15, 0.96) 0%, rgba(17, 19, 15, 0.78) 54%, rgba(17, 19, 15, 0.9) 100%);
  }

  .masthead {
    align-items: flex-start;
  }

  .brand span {
    display: none;
  }

  .hero-copy {
    align-self: end;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    padding-top: 78px;
  }

  h1 {
    max-width: 4.6em;
    font-size: clamp(44px, 15vw, 62px);
    line-height: 0.96;
  }

  .lede {
    width: min(330px, 100%);
    max-width: calc(100vw - 24px);
    font-size: 17px;
  }

  .hero-ledger,
  .principle-strip,
  .flowline,
  .boundary-grid {
    grid-template-columns: 1fr;
  }

  .hero-ledger div,
  .principle-strip article,
  .flowline article {
    border-right: 0;
    border-bottom: 1px solid rgba(17, 19, 15, 0.68);
  }

  .hero-ledger div:last-child,
  .principle-strip article:last-child,
  .flowline article:last-child {
    border-bottom: 0;
  }

  .principle-strip article {
    min-height: 0;
  }

  .loop-section,
  .mapping-section,
  .context-section,
  .boundary-section,
  .closing-section {
    width: min(100vw - 20px, 680px);
  }

  .loop-heading h2,
  .mapping-section > h2,
  .context-copy h2,
  .boundary-section h2,
  .closing-section h2 {
    font-size: clamp(34px, 12vw, 52px);
  }

  .flowline::before {
    top: 0;
    bottom: 0;
    left: 38px;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, var(--red), var(--amber), var(--green), var(--blue));
  }

  .flowline article {
    min-height: 0;
    padding: 22px 20px 22px 72px;
  }

  .flow-index {
    position: absolute;
    left: 19px;
    top: 20px;
    background: var(--cream);
  }

  .flowline h3 {
    margin-top: 0;
  }

  .table-head {
    display: none;
  }

  .mapping-table article {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .mapping-table h3,
  .mapping-table p {
    border-right: 0;
  }

  .mapping-table h3 {
    padding-bottom: 6px;
  }

  .mapping-table p {
    padding-top: 8px;
    border-top: 1px solid rgba(207, 194, 170, 0.7);
  }

  .context-ladder li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .context-ladder li::before {
    font-size: 34px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .hero-ledger,
  .principle-strip article,
  .flowline,
  .mapping-table,
  .context-ladder li,
  .boundary-grid article,
  .closing-section {
    animation: rise-in 700ms both cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .hero-ledger {
    animation-delay: 120ms;
  }

  .principle-strip article:nth-child(2),
  .context-ladder li:nth-child(2),
  .boundary-grid article:nth-child(2) {
    animation-delay: 70ms;
  }

  .principle-strip article:nth-child(3),
  .context-ladder li:nth-child(3),
  .boundary-grid article:nth-child(3) {
    animation-delay: 140ms;
  }

  .principle-strip article:nth-child(4),
  .context-ladder li:nth-child(4),
  .boundary-grid article:nth-child(4) {
    animation-delay: 210ms;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
