:root {
  --ink: #16241c;
  --ink-soft: #3e4d45;
  --paper: #f3eee6;
  --paper-deep: #e7e0d4;
  --white: #fbf8f3;
  --forest: #143228;
  --forest-deep: #0d241c;
  --clay: #9d4528;
  --clay-hot: #c45c38;
  --line: rgba(20, 34, 28, 0.12);
  --serif: "Fraunces", "Iowan Old Style", Palatino, serif;
  --sans: "Figtree", "Avenir Next", "Segoe UI", sans-serif;
  --x: 72%;
  --y: 18%;
  --shift: 0px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.04em;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--white);
  color: var(--ink);
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
}

.skip:focus {
  top: 1rem;
}

.rail {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: 100%;
  height: 3px;
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
  background: var(--clay);
  pointer-events: none;
}

.top {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 6vw;
}

.brand,
.top-link,
.foot a {
  text-decoration: none;
  font-weight: 700;
}

.brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.top-link {
  border-bottom: 1px solid transparent;
}

.top-link:hover,
.brand:hover,
.foot a:hover {
  color: var(--clay);
}

.kicker {
  margin: 0 0 0.8rem;
  color: var(--clay);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.open {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 6.5rem 6vw 2rem;
  background: var(--forest);
  color: var(--paper);
  overflow: hidden;
}

.open::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: -1;
  background:
    radial-gradient(520px circle at var(--x) var(--y), rgba(196, 92, 56, 0.55), transparent 58%),
    radial-gradient(680px 420px at 0% 100%, rgba(243, 238, 230, 0.08), transparent 60%);
  pointer-events: none;
}

.open .kicker {
  color: #f0b59a;
}

h1 {
  font-size: clamp(4.4rem, 13vw, 10.5rem);
  line-height: 0.84;
  font-weight: 640;
  max-width: 11ch;
}

h1 em {
  display: inline-block;
  font-style: italic;
  font-weight: 560;
  color: #f3c7b4;
  transform: translateX(var(--shift));
}

.lede {
  max-width: 36rem;
  margin-top: 1.6rem;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: rgba(243, 238, 230, 0.88);
}

.mark {
  background-image: linear-gradient(#e7b39a, #e7b39a);
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 100% 0.28em;
}

.open-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: auto 0 0;
  padding: 2.5rem 0 0;
  list-style: none;
}

.open-facts li {
  border-top: 1px solid rgba(243, 238, 230, 0.28);
  padding-top: 0.8rem;
}

.open-facts span {
  font-family: var(--serif);
  color: #f0b59a;
}

.open-facts strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.15rem;
}

.open-facts p {
  margin-top: 0.25rem;
  color: rgba(243, 238, 230, 0.72);
  font-size: 0.95rem;
}

.chapter,
.reach,
.foot {
  padding-left: 6vw;
  padding-right: 6vw;
}

.chapter {
  padding-top: 5rem;
  padding-bottom: 1rem;
}

.chapter-head {
  max-width: 18em;
  margin-bottom: 1.6rem;
}

h2 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.96;
}

.proof,
.ledger {
  margin: 0;
  padding: 0;
  list-style: none;
}

.proof a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  align-items: baseline;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.proof li:last-child a {
  border-bottom: 1px solid var(--line);
}

.proof span {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--clay);
  line-height: 1;
}

.proof h3 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.05;
}

.proof p {
  margin-top: 0.35rem;
  max-width: 40rem;
  color: var(--ink-soft);
}

.proof a:hover h3,
.proof a:focus-visible h3 {
  color: var(--clay);
}

.aside {
  max-width: 40rem;
  margin-top: 1.2rem;
  color: var(--ink-soft);
}

.chapter-plain {
  padding-bottom: 2rem;
}

.ledger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.ledger li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.15rem 1.2rem 1.25rem;
}

.ledger span {
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.ledger p {
  margin-top: 0.4rem;
  color: var(--ink-soft);
}

.reach {
  margin-top: 3rem;
  padding-top: 4rem;
  padding-bottom: 4rem;
  background: var(--forest-deep);
  color: var(--paper);
}

.reach .kicker {
  color: #f0b59a;
}

.reach h2 {
  max-width: 12em;
}

.reach-mail,
.reach-phone {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 1rem;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4.4vw, 3.4rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.reach-mail {
  margin-top: 1.4rem;
  color: #f3c7b4;
}

.reach-phone:hover,
.reach-mail:hover,
.reach-linkedin:hover {
  color: white;
}

.reach-linkedin {
  display: inline-block;
  margin-top: 1.2rem;
  color: #f3c7b4;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.82rem;
}

.reach-note {
  margin-top: 1.4rem;
  color: rgba(243, 238, 230, 0.7);
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.4rem;
  padding-bottom: 1.6rem;
  background: var(--paper-deep);
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: no-preference) {
  .line {
    animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .line:nth-child(2) {
    animation-delay: 0.08s;
  }

  .open-facts li {
    animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .open-facts li:nth-child(2) {
    animation-delay: 0.12s;
  }

  .open-facts li:nth-child(3) {
    animation-delay: 0.2s;
  }

  .proof a {
    transition: padding-left 0.25s ease;
  }

  .proof a:hover {
    padding-left: 0.4rem;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 800px) {
  h1 {
    font-size: clamp(3.5rem, 18vw, 5.5rem);
  }

  .open-facts,
  .ledger {
    grid-template-columns: 1fr;
  }

  .open {
    min-height: auto;
    padding-top: 5.5rem;
  }

  .open-facts {
    margin-top: 2.2rem;
  }
}

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

  .rail {
    display: none;
  }

  h1 em {
    transform: none;
  }
}
