:root {
  --stone: #f1eee5;
  --white: #fffdf8;
  --cobalt: #164ca2;
  --cobalt-dark: #10356f;
  --terra: #d56e4a;
  --olive: #718259;
  --ink: #20262b;
  --muted: #697077;
  --line: rgba(32, 38, 43, .16);
  --shadow: 0 24px 70px rgba(21, 57, 105, .14);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  overflow-x: hidden;
}

body {
  max-width: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--stone);
  font-family: var(--sans);
  line-height: 1.7;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

main,
section,
article,
header,
footer,
nav,
div,
figure,
aside {
  min-width: 0;
}

h1,
h2,
h3,
p,
li,
th,
td,
figcaption,
a {
  overflow-wrap: anywhere;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 9px;
  left: 9px;
  z-index: 1000;
  padding: 12px 17px;
  color: var(--white);
  background: var(--cobalt);
  font-weight: 800;
  transform: translateY(-160%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 90px;
  padding: 10px max(20px, 5vw);
  display: grid;
  grid-template-columns: 255px 1fr auto;
  align-items: center;
  gap: 30px;
  background: rgba(255, 253, 248, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.logo {
  width: 235px;
  display: block;
}

.logo img {
  width: 100%;
}

.site-header nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(20px, 3vw, 45px);
}

.site-header nav a {
  position: relative;
  padding: 10px 2px;
  color: var(--cobalt-dark);
  font-size: .77rem;
  font-weight: 800;
  text-decoration: none;
}

.site-header nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 3px;
  content: "";
  background: var(--terra);
  transform: scaleX(0);
  transition: transform .3s var(--ease);
}

.site-header nav a:hover::after {
  transform: scaleX(1);
}

.site-header > strong {
  display: grid;
  width: 46px;
  aspect-ratio: 1;
  place-items: center;
  color: var(--white);
  background: var(--cobalt);
  font-size: .76rem;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.hero {
  min-height: 830px;
  padding: clamp(55px, 7vw, 105px) max(24px, 6vw);
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: clamp(45px, 7vw, 115px);
  background:
    linear-gradient(90deg, rgba(22, 76, 162, .055) 1px, transparent 1px),
    linear-gradient(rgba(22, 76, 162, .055) 1px, transparent 1px),
    var(--stone);
  background-size: 54px 54px;
  border-bottom: 12px solid var(--cobalt);
}

.hero-copy {
  position: relative;
  max-width: 760px;
  justify-self: end;
  padding: clamp(35px, 5vw, 70px);
  color: var(--white);
  background: var(--cobalt);
  box-shadow: -18px 18px 0 var(--terra);
}

.hero-copy::before,
.hero-copy::after {
  position: absolute;
  content: "";
  border: 2px solid rgba(255, 255, 255, .45);
}

.hero-copy::before {
  inset: 14px;
}

.hero-copy::after {
  top: -25px;
  right: -25px;
  width: 70px;
  aspect-ratio: 1;
  background: var(--olive);
  border: 8px solid var(--stone);
  transform: rotate(45deg);
}

.hero h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  font: 400 clamp(4rem, 7vw, 7.5rem)/.88 var(--serif);
  letter-spacing: -.06em;
}

.hero-image {
  position: relative;
  max-width: 830px;
}

.hero-image::before {
  position: absolute;
  top: -28px;
  right: -28px;
  bottom: 28px;
  left: 28px;
  z-index: 0;
  content: "";
  background:
    linear-gradient(45deg, var(--cobalt) 25%, transparent 25% 75%, var(--cobalt) 75%),
    linear-gradient(45deg, var(--cobalt) 25%, var(--white) 25% 75%, var(--cobalt) 75%);
  background-position: 0 0, 20px 20px;
  background-size: 40px 40px;
}

.hero-image figure {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 10px;
  background: var(--white);
  border: 2px solid var(--cobalt-dark);
  box-shadow: var(--shadow);
}

.hero-image figure img {
  width: 100%;
  min-height: 430px;
  max-height: 650px;
  object-fit: cover;
}

.hero-image figcaption {
  padding: 12px 9px 3px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
}

.lead-content {
  width: min(1100px, calc(100% - 40px));
  max-width: 100%;
  margin-inline: auto;
  padding: clamp(80px, 10vw, 145px) 0;
  color: #465058;
  font-size: clamp(1rem, 1.2vw, 1.13rem);
}

.lead-content > p:first-child {
  max-width: 940px;
  margin: 0 auto 28px;
  color: var(--cobalt-dark);
  font: 400 clamp(1.45rem, 2.4vw, 2rem)/1.5 var(--serif);
  text-align: center;
}

.lead-content > p:nth-child(2) {
  max-width: 820px;
  margin: 0 auto 45px;
  text-align: center;
}

.chapters {
  border-top: 1px solid var(--line);
}

.chapter {
  position: relative;
  padding: clamp(70px, 9vw, 130px) max(24px, 6vw);
  display: grid;
  grid-template-columns: minmax(250px, .65fr) minmax(0, 1.35fr);
  justify-content: center;
  gap: clamp(45px, 8vw, 140px);
  border-bottom: 1px solid var(--line);
}

.chapter:nth-child(even) {
  background: var(--white);
}

.chapter:nth-child(4n) {
  background: rgba(113, 130, 89, .11);
}

.chapter-heading {
  align-self: stretch;
}

.chapter-heading h2 {
  position: sticky;
  top: 125px;
  max-width: 420px;
  margin: 0;
  padding-top: 25px;
  color: var(--cobalt-dark);
  border-top: 9px solid var(--terra);
  font: 400 clamp(2.4rem, 4vw, 4.5rem)/1 var(--serif);
  letter-spacing: -.045em;
}

.chapter:nth-child(3n) .chapter-heading h2 {
  border-top-color: var(--olive);
}

.chapter-body {
  width: min(820px, 100%);
  max-width: 100%;
  color: #465058;
  font-size: clamp(1rem, 1.15vw, 1.1rem);
}

.lead-content p,
.chapter-body p {
  margin: 0 0 1.45em;
}

.chapter-body h3 {
  margin: 48px 0 20px;
  color: var(--cobalt);
  font: 700 clamp(1.5rem, 2.6vw, 2.25rem)/1.15 var(--serif);
  letter-spacing: -.025em;
}

.lead-content ul,
.lead-content ol,
.chapter-body ul,
.chapter-body ol {
  margin: 24px 0 38px;
  padding: 0;
  list-style: none;
  counter-reset: item;
}

.lead-content li,
.chapter-body li {
  position: relative;
  margin: 9px 0;
  padding: 6px 0 6px 43px;
}

.lead-content ul > li::before,
.chapter-body ul > li::before {
  position: absolute;
  top: .83em;
  left: 11px;
  width: 11px;
  aspect-ratio: 1;
  content: "";
  background: var(--terra);
  transform: rotate(45deg);
}

.lead-content ol > li,
.chapter-body ol > li {
  counter-increment: item;
}

.lead-content ol > li::before,
.chapter-body ol > li::before {
  position: absolute;
  top: 4px;
  left: 0;
  width: 29px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--white);
  content: counter(item);
  background: var(--cobalt);
  font-size: .68rem;
  font-weight: 900;
}

.lead-content li ul,
.lead-content li ol,
.chapter-body li ul,
.chapter-body li ol {
  margin: 10px 0 0;
}

.chapter-body aside {
  position: relative;
  max-width: 100%;
  margin: 45px 0;
  padding: 34px 38px 34px 82px;
  color: var(--white);
  background: var(--cobalt);
  box-shadow: 10px 10px 0 var(--terra);
}

.chapter-body aside::before {
  position: absolute;
  top: 28px;
  left: 29px;
  content: "!";
  color: var(--white);
  font: 700 2.8rem/1 var(--serif);
}

.chapter-body aside p:last-child,
.chapter-body aside > :last-child {
  margin-bottom: 0;
}

.chapter-body figure {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 60px 0;
  padding: 10px;
  background: var(--white);
  border: 2px solid var(--cobalt);
  box-shadow: 12px 12px 0 var(--terra);
  overflow: hidden;
}

.chapter-body figure img {
  width: 100%;
  max-height: 700px;
  object-fit: contain;
  background: #112d57;
}

.chapter-body figcaption {
  padding: 13px 10px 3px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  margin: 42px 0 62px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 18px 55px rgba(21, 57, 105, .09);
  -webkit-overflow-scrolling: touch;
}

.lead-content table,
.chapter-body table {
  width: max-content;
  min-width: 100%;
  max-width: none;
  margin: 0;
  border-collapse: collapse;
  background: var(--white);
}

.lead-content > table,
.chapter-body > table {
  width: 100%;
  max-width: 100%;
  margin: 42px 0 62px;
  display: block;
  overflow-x: auto;
}

thead {
  color: var(--white);
  background: var(--cobalt-dark);
}

th,
td {
  min-width: 155px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: .84rem;
  line-height: 1.55;
}

th {
  color: #dce8ff;
  font-size: .69rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

tbody tr:nth-child(even) {
  background: rgba(22, 76, 162, .045);
}

strong {
  color: var(--cobalt-dark);
}

.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

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

.site-footer {
  min-height: 350px;
  padding: 80px max(24px, 7vw);
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  align-items: center;
  gap: 40px;
  color: var(--white);
  background:
    linear-gradient(135deg, transparent 62%, rgba(213, 110, 74, .3) 62%),
    var(--cobalt-dark);
  border-top: 12px solid var(--terra);
}

.site-footer > img {
  width: min(340px, 75vw);
  filter: brightness(0) invert(1);
}

.site-footer nav {
  display: flex;
  gap: 28px;
}

.site-footer nav a {
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
}

.site-footer nav a:hover {
  color: #cdd9b8;
}

.site-footer p {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(255, 255, 255, .65);
  font-size: .74rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .hero {
    min-height: 730px;
    grid-template-columns: minmax(0, .9fr) minmax(340px, 1.1fr);
    gap: 40px;
  }

  .hero h1 {
    font-size: clamp(3.7rem, 7vw, 5.8rem);
  }

  .chapter {
    grid-template-columns: minmax(210px, .55fr) minmax(0, 1.45fr);
    gap: 45px;
  }
}

@media (max-width: 700px) {
  html {
    scroll-padding-top: 135px;
  }

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

  .logo {
    width: 190px;
  }

  .site-header nav {
    grid-column: 1 / -1;
    justify-content: center;
    padding-top: 7px;
    border-top: 1px solid var(--line);
  }

  .site-header > strong {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 39px;
  }

  .hero {
    min-height: auto;
    padding: 75px 18px 95px;
    grid-template-columns: 1fr;
    gap: 75px;
  }

  .hero-copy {
    justify-self: stretch;
  }

  .hero h1 {
    font-size: clamp(3.5rem, 13vw, 5.5rem);
  }

  .hero-image {
    width: min(94%, 650px);
    margin-inline: auto;
  }

  .hero-image figure img {
    min-height: 330px;
  }

  .chapter {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .chapter-heading h2 {
    position: static;
    max-width: 650px;
  }

  .chapter-body {
    width: 100%;
  }

  .site-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .site-footer > img {
    margin-inline: auto;
  }

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

@media (max-width: 430px) {
  .site-header {
    padding-inline: 13px;
  }

  .logo {
    width: 155px;
  }

  .site-header nav {
    gap: 16px;
  }

  .site-header nav a {
    font-size: .69rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 4.2rem);
  }

  .hero-copy {
    padding: 32px 24px;
    box-shadow: -9px 9px 0 var(--terra);
  }

  .hero-copy::after {
    display: none;
  }

  .hero-image::before {
    top: -15px;
    right: -15px;
    bottom: 15px;
    left: 15px;
    background-size: 28px 28px;
  }

  .hero-image figure {
    padding: 6px;
  }

  .hero-image figure img {
    min-height: 270px;
  }

  .lead-content {
    width: calc(100% - 28px);
  }

  .chapter {
    padding-inline: 14px;
  }

  .chapter-heading h2 {
    font-size: 2.4rem;
  }

  .chapter-body aside {
    padding: 28px 18px 28px 57px;
    box-shadow: 7px 7px 0 var(--terra);
  }

  .chapter-body aside::before {
    top: 24px;
    left: 20px;
  }

  .chapter-body figure {
    padding: 6px;
    box-shadow: 8px 8px 0 var(--terra);
  }

  .table-scroll {
    border-radius: 0;
  }

  th,
  td {
    min-width: 145px;
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

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