:root {
  --paper: #f7f7f4;
  --ink: #111210;
  --muted: #62635e;
  --line: #d7d8d2;
  --accent: #c9ff39;
  --page: min(1440px, 100%);
  --gutter: clamp(1.25rem, 4vw, 4rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: var(--paper);
  background: var(--ink);
}

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

a:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

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

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.5rem 0.75rem;
  color: var(--paper);
  background: var(--ink);
  font-size: 0.75rem;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 244, 0.96);
}

.wordmark {
  flex: 0 0 auto;
  font-size: 0.73rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.6vw, 2.5rem);
}

.nav a {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-decoration: none;
}

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

main,
.footer {
  width: var(--page);
  margin-inline: auto;
}

.section-index,
.row-index {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1.3;
}

.hero {
  display: grid;
  min-height: min(84vh, 780px);
  grid-template-columns: minmax(10rem, 0.7fr) minmax(18rem, 1.3fr);
  align-content: center;
  gap: var(--gutter);
  padding: 9rem var(--gutter) 6rem;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 59rem;
}

.hero h1,
.legal-intro h1 {
  max-width: 16em;
  margin-bottom: 2rem;
  font-size: clamp(2.5rem, 6.2vw, 6.6rem);
  font-weight: 300;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero-copy > p {
  max-width: 41rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
}

.text-link {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.text-link span {
  display: inline-block;
  margin-left: 0.35rem;
  transition: transform 180ms ease;
}

.text-link:hover span {
  transform: translate(0.18rem, -0.18rem);
}

.services,
.principles {
  padding: clamp(5rem, 10vw, 10rem) var(--gutter);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(10rem, 0.7fr) minmax(18rem, 1.3fr);
  gap: var(--gutter);
  margin-bottom: clamp(3rem, 7vw, 6rem);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3.2vw, 3.2rem);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.service-list {
  border-top: 1px solid var(--ink);
}

.service-row {
  display: grid;
  grid-template-columns: 0.25fr 0.7fr 1.3fr;
  gap: var(--gutter);
  align-items: baseline;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}

.service-row h3 {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 300;
}

.service-row p {
  max-width: 36rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.91rem;
}

.accent-rule {
  width: 100%;
  height: 0.35rem;
  background: var(--accent);
}

.principle-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
}

.principle-row p {
  min-height: 8rem;
  margin: 0;
  padding: 1.5rem 1.5rem 1.5rem 0;
  border-right: 1px solid var(--line);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
}

.principle-row p:last-child {
  border-right: 0;
  padding-left: 1.5rem;
}

.principle-row p:nth-child(2) {
  padding-left: 1.5rem;
}

.principle-row span {
  display: block;
  margin-bottom: 2.3rem;
  color: var(--muted);
  font-size: 0.67rem;
  letter-spacing: 0.14em;
}

.footer {
  padding: 2.25rem var(--gutter) 1.5rem;
  border-top: 1px solid var(--ink);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.footer-grid p,
.footer-links,
.copyright {
  font-size: 0.74rem;
}

.footer-grid p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1.2rem;
}

.copyright {
  margin: 3rem 0 0;
  color: var(--muted);
}

.legal {
  padding: 0 var(--gutter) clamp(5rem, 10vw, 9rem);
}

.legal-intro {
  display: grid;
  min-height: 68vh;
  grid-template-columns: minmax(10rem, 0.7fr) minmax(18rem, 1.3fr);
  align-content: center;
  gap: var(--gutter);
  padding-top: 6rem;
  border-bottom: 1px solid var(--ink);
}

.legal-intro h1 {
  margin-bottom: 0;
}

.legal-intro > p:last-child {
  grid-column: 2;
  max-width: 37rem;
  color: var(--muted);
}

.legal-sections section {
  display: grid;
  grid-template-columns: minmax(5rem, 0.25fr) minmax(18rem, 1.3fr);
  gap: var(--gutter);
  padding: 2.4rem 0;
  border-bottom: 1px solid var(--line);
}

.legal-sections section > div {
  max-width: 49rem;
}

.legal-sections h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.legal-sections p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

@media (max-width: 760px) {
  .topbar {
    min-height: 3rem;
  }

  .nav {
    gap: 1rem;
  }

  .nav a:nth-child(2),
  .nav a:nth-child(4) {
    display: none;
  }

  .hero {
    min-height: 90vh;
    grid-template-columns: 1fr;
    align-content: end;
    gap: 2.5rem;
    padding-top: 8rem;
  }

  .hero h1,
  .legal-intro h1 {
    font-size: clamp(2.65rem, 13vw, 4.6rem);
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .service-row {
    grid-template-columns: 2.75rem 1fr;
    gap: 0.6rem 1rem;
  }

  .service-row p {
    grid-column: 2;
  }

  .principle-row {
    grid-template-columns: 1fr;
  }

  .principle-row p,
  .principle-row p:nth-child(2),
  .principle-row p:last-child {
    min-height: 0;
    padding: 1.5rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .principle-row p:last-child {
    border-bottom: 0;
  }

  .principle-row span {
    margin-bottom: 1rem;
  }

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

  .footer-links {
    justify-content: flex-start;
  }

  .legal-intro {
    min-height: 75vh;
    grid-template-columns: 1fr;
    align-content: end;
    gap: 2rem;
    padding-bottom: 4rem;
  }

  .legal-intro > p:last-child {
    grid-column: 1;
  }

  .legal-sections section {
    grid-template-columns: 2.75rem 1fr;
    gap: 1rem;
  }
}

@media (max-width: 390px) {
  .wordmark {
    font-size: 0.65rem;
  }

  .nav a:nth-child(3) {
    display: none;
  }
}

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

  .text-link span {
    transition: none;
  }
}
