@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #171916;
  --paper: #ecefed;
  --accent: #91b9d3;
  --accent-soft: #e7f2f6;
  --gold: #a8895c;
  --muted: #74766f;
  --rule: rgba(23, 25, 22, 0.22);
  --display: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  padding: 0.7rem 0.85rem;
  background: var(--accent-soft);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 180ms ease;
}

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

.site-header,
.hero,
.section-rule,
.contact {
  width: min(100% - 3rem, 92rem);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.65rem 0 0.7rem;
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.05;
  text-transform: uppercase;
}

.hero {
  --scroll-progress: 0;
  position: relative;
  display: grid;
  min-height: min(47rem, calc(100vh - 4.5rem));
  grid-template-columns: minmax(9rem, 0.34fr) minmax(20rem, 1fr) minmax(13rem, 0.56fr);
  grid-template-rows: auto 1fr auto;
  column-gap: 2rem;
  margin-top: 1.6rem;
  padding: 1.2rem 1.25rem 1.1rem;
  overflow: hidden;
  border: 1px solid var(--ink);
  perspective: 1200px;
}

.hero::before,
.hero::after {
  position: absolute;
  right: -1px;
  left: -1px;
  z-index: 0;
  display: block;
  content: "";
  pointer-events: none;
  transform-style: preserve-3d;
  transition: opacity 180ms ease;
}

.hero::before {
  top: -1px;
  height: 12rem;
  background: linear-gradient(180deg, rgba(236, 239, 237, 0.98), rgba(236, 239, 237, 0.74));
  clip-path: polygon(0 0, 100% 0, 50% 78%, 0 0);
  opacity: calc(0.66 - (var(--scroll-progress) * 0.28));
  transform: rotateX(calc(var(--scroll-progress) * -7deg));
  transform-origin: 50% 0;
}

.hero::after {
  bottom: -1px;
  height: 8rem;
  background: linear-gradient(0deg, rgba(236, 239, 237, 0.96), rgba(236, 239, 237, 0.42));
  clip-path: polygon(0 100%, 100% 100%, 50% 0, 0 100%);
  opacity: calc(0.58 - (var(--scroll-progress) * 0.26));
  transform: rotateX(calc(var(--scroll-progress) * 8deg));
  transform-origin: 50% 100%;
}

.envelope-seam {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 10rem;
  z-index: 0;
  pointer-events: none;
  opacity: calc(0.86 - (var(--scroll-progress) * 0.38));
  transform: translateY(calc(var(--scroll-progress) * -1.4rem)) rotateX(calc(var(--scroll-progress) * 4deg));
  transform-origin: 50% 0;
  transition: opacity 180ms ease;
}

.envelope-seam svg {
  width: 100%;
  height: 100%;
}

.envelope-seam path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.65;
  vector-effect: non-scaling-stroke;
  opacity: 0.65;
}

.hero-meta,
.hero-footer,
.section-label,
.practice-number,
.contact-topline,
.contact-bottomline {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.4;
}

.hero-meta {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  grid-column: 1 / -1;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
  text-transform: uppercase;
}

.hero-content {
  position: relative;
  z-index: 1;
  align-self: center;
  grid-column: 1 / 3;
  padding: 9rem 0 8.5rem;
  transform: translate3d(0, calc(var(--scroll-progress) * -1.35rem), 0);
  transition: transform 180ms ease;
}

.postal-stamp {
  position: absolute;
  top: 7.5rem;
  right: 8.5rem;
  z-index: 1;
  width: 9.25rem;
  aspect-ratio: 0.82;
  padding: 0.42rem;
  background: var(--accent);
  color: var(--ink);
  transform: rotate(5deg) translate3d(0, calc(var(--scroll-progress) * -1rem), 0);
  transition: transform 180ms ease;
}

.postal-stamp::before {
  position: absolute;
  inset: 0.24rem;
  border: 1px dashed rgba(23, 25, 22, 0.58);
  content: "";
}

.postal-stamp-inner {
  position: relative;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.72rem 0.62rem 0.62rem;
  border: 1px solid rgba(23, 25, 22, 0.6);
  font-family: var(--mono);
  font-size: 0.53rem;
  line-height: 1.25;
  text-transform: uppercase;
}

.postal-stamp strong {
  align-self: center;
  font-family: var(--display);
  font-size: 3.85rem;
  font-weight: 800;
  letter-spacing: -0.12em;
  line-height: 0.85;
}

.eyebrow {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
}

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

h1,
h2,
h3 {
  letter-spacing: -0.065em;
}

h1 {
  max-width: 13ch;
  margin-bottom: 1.7rem;
  font-size: clamp(3.5rem, 7vw, 7.3rem);
  font-weight: 600;
  line-height: 0.93;
}

.hero-intro {
  max-width: 29rem;
  margin-bottom: 0;
  font-size: clamp(1rem, 1.3vw, 1.25rem);
  line-height: 1.35;
}

.hero-aside {
  position: relative;
  z-index: 1;
  align-self: end;
  justify-self: end;
  width: min(100%, 19rem);
  margin-bottom: 1rem;
  padding: 1rem 0 1rem 1.2rem;
  border-left: 1px solid var(--accent);
  background: rgba(139, 189, 232, 0.08);
  transform: translate3d(0, calc(var(--scroll-progress) * -0.7rem), 0);
  transition: transform 180ms ease;
}

.hero-aside p {
  margin-bottom: 1rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.hero-aside ul {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  line-height: 1.35;
}

.hero-aside li {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.hero-aside li::before {
  width: 0.35rem;
  height: 0.35rem;
  flex: 0 0 auto;
  background: var(--accent);
  content: "";
}

.hero-aside::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-top: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  content: "";
}

.hero-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  grid-column: 1 / -1;
  gap: 2rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--rule);
  text-transform: uppercase;
}

.section-rule {
  display: grid;
  grid-template-columns: minmax(9rem, 0.34fr) minmax(0, 1.56fr);
  column-gap: 2rem;
  border-top: 1px solid var(--rule);
}

.section-label {
  display: flex;
  gap: 1rem;
  padding-top: 1.35rem;
  text-transform: uppercase;
}

.section-index {
  color: var(--gold);
}

.statement {
  padding-bottom: 10rem;
}

.statement-copy {
  display: grid;
  grid-template-columns: minmax(15rem, 1.2fr) minmax(13rem, 0.7fr);
  gap: 4rem;
  padding-top: 5.7rem;
}

.statement h2,
.practice h2 {
  margin-bottom: 0;
  font-size: clamp(2.5rem, 5.2vw, 5.3rem);
  font-weight: 600;
  line-height: 0.98;
}

.statement-copy p {
  max-width: 25rem;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.practice {
  padding-bottom: 9rem;
}

.practice-content {
  position: relative;
  padding-top: 5.7rem;
}

.practice h2 {
  margin-bottom: 3.5rem;
}

.practice-intro {
  max-width: 31rem;
  margin: -1.8rem 0 3.5rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.practice-postage {
  position: relative;
  display: grid;
  width: 10rem;
  margin: 2.8rem auto 0;
  aspect-ratio: 1;
  place-items: center;
  padding: 1rem;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  text-align: center;
  transform: rotate(-8deg);
  transition: opacity 240ms ease, transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.practice-postage::before,
.practice-postage::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.practice-postage::before {
  inset: 0.38rem;
  border: 1px dashed currentColor;
  border-radius: 50%;
}

.practice-postage::after {
  right: -0.85rem;
  left: -0.85rem;
  height: 2.1rem;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  opacity: 0.75;
}

.practice-postage span,
.practice-postage i {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 0.52rem;
  line-height: 1.25;
  text-transform: uppercase;
}

.practice-postage strong {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.12em;
  line-height: 0.8;
}

.practice-postage i {
  font-style: normal;
}

.practice-item-meta {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  line-height: 1.3;
  text-transform: uppercase;
}

.practice-item {
  transition: opacity 420ms ease, transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.practice.has-motion .practice-intro,
.practice.has-motion .practice-item,
.practice.has-motion .practice-postage {
  opacity: 0;
}

.practice.has-motion .practice-intro,
.practice.has-motion .practice-item {
  transform: translateY(1.25rem);
}

.practice.has-motion .practice-postage {
  transform: rotate(-20deg) scale(0.8);
}

.practice.is-revealed .practice-intro,
.practice.is-revealed .practice-postage,
.practice.is-revealed .practice-item {
  opacity: 1;
  transform: none;
}

.practice.is-revealed .practice-postage {
  transform: rotate(-8deg) scale(1);
}

.practice.is-revealed .practice-item:nth-child(1) {
  transition-delay: 80ms;
}

.practice.is-revealed .practice-item:nth-child(2) {
  transition-delay: 200ms;
}

.practice.is-revealed .practice-item:nth-child(3) {
  transition-delay: 320ms;
}

.practice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}

.practice-item {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.9rem;
  padding: 1rem 1rem 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.practice-item:nth-child(odd) {
  padding-right: 2rem;
  border-right: 1px solid var(--rule);
}

.practice-item:nth-child(even) {
  padding-left: 2rem;
}

.practice-number {
  grid-row: 1 / 3;
  padding-top: 0.2rem;
}

.practice-item h3 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.5rem, 2.4vw, 2.4rem);
  font-weight: 600;
  line-height: 1;
}

.practice-item p {
  max-width: 17rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.contact {
  position: relative;
  overflow: hidden;
  padding: 1.35rem 1.7rem 1.15rem;
  background: var(--ink);
  color: var(--paper);
}

.contact::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5.5rem;
  background: linear-gradient(32deg, transparent 49.7%, rgba(236, 239, 237, 0.18) 50%, transparent 50.3%),
    linear-gradient(-32deg, transparent 49.7%, rgba(236, 239, 237, 0.18) 50%, transparent 50.3%);
  background-size: 50% 100%;
  background-position: left top, right top;
  background-repeat: no-repeat;
  content: "";
  pointer-events: none;
}

.contact-topline,
.contact-bottomline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(236, 239, 237, 0.56);
  text-transform: uppercase;
}

.contact-body {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  min-height: 30rem;
  padding: 5rem 0 6rem;
}

.contact h2 {
  max-width: 10ch;
  margin-bottom: 0;
  color: var(--paper);
  font-size: clamp(3rem, 7.2vw, 7.7rem);
  font-weight: 600;
  line-height: 0.91;
}

.contact h2 em {
  color: var(--accent);
  font-style: normal;
}

.contact-link {
  flex: 0 0 auto;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--accent);
  color: var(--paper);
  font-family: var(--mono);
  font-size: clamp(0.8rem, 1.4vw, 1rem);
}

.footer-link {
  color: var(--accent);
  font-family: var(--mono);
  text-decoration: none;
}

.footer-link span {
  display: inline-block;
  margin-left: 0.35rem;
}

.contact-bottomline {
  padding-top: 0.8rem;
  border-top: 1px solid rgba(236, 239, 237, 0.22);
  font-size: 0.6rem;
}

@media (max-width: 760px) {
  .site-header,
  .hero,
  .section-rule,
  .contact {
    width: min(100% - 2rem, 92rem);
  }

  .site-header {
    padding-top: 1.25rem;
  }

  .hero {
    display: flex;
    min-height: 0;
    flex-direction: column;
    margin-top: 1rem;
    padding: 1rem 1rem 1rem;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
  }

  .hero-content {
    padding: 7rem clamp(0.35rem, 5vw, 2rem) 3.5rem;
  }

  .postal-stamp {
    top: 4.75rem;
    right: 1rem;
    width: 7.4rem;
  }

  h1 {
    max-width: 10.5ch;
    font-size: clamp(3.65rem, 17vw, 7rem);
  }

  .hero-aside {
    align-self: flex-end;
    width: min(100%, 19rem);
    margin-bottom: 3rem;
  }

  .hero-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
    text-align: right;
  }

  .section-rule {
    display: block;
  }

  .statement,
  .practice {
    padding-bottom: 6rem;
  }

  .statement-copy,
  .practice-content {
    padding: 3rem clamp(1rem, 8vw, 3rem) 0;
  }

  .practice-postage {
    width: 6.8rem;
    margin: 2.4rem auto 0;
    opacity: 0.68;
  }

  .practice.has-motion .practice-postage {
    transform: rotate(-20deg) scale(0.8);
  }

  .practice.is-revealed .practice-postage {
    transform: rotate(-8deg) scale(1);
  }

  .practice-intro {
    max-width: 22rem;
    margin: 0.2rem 0 2.5rem auto;
  }

  .statement-copy {
    display: block;
  }

  .statement-copy p {
    max-width: 22rem;
    margin-top: 2rem;
    margin-left: auto;
  }

  .practice h2 {
    margin-bottom: 2.2rem;
    margin-left: 6%;
  }

  .practice-list {
    display: block;
  }

  .practice-item,
  .practice-item:nth-child(odd),
  .practice-item:nth-child(even) {
    padding: 1rem 0 1.25rem;
    border-right: 0;
  }

  .practice-item:nth-child(1) {
    margin-right: 10%;
  }

  .practice-item:nth-child(2) {
    margin-left: 8%;
    margin-right: 2%;
  }

  .practice-item:nth-child(3) {
    margin-left: 16%;
  }

  .contact {
    padding: 1rem 1rem 0.9rem;
  }

  .contact-body {
    display: block;
    min-height: 0;
    padding: 5rem clamp(0.5rem, 7vw, 2rem) 5.5rem;
  }

  .contact-link {
    display: inline-block;
    margin-top: 3.5rem;
    margin-left: auto;
  }

  .contact-bottomline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: baseline;
    gap: 0.5rem;
    white-space: nowrap;
  }

  .contact-bottomline > :nth-child(2) {
    justify-self: center;
  }

  .contact-bottomline > :last-child {
    justify-self: end;
    text-align: right;
  }
}

@media (max-width: 380px) {
  .contact-bottomline {
    font-size: 0.52rem;
    gap: 0.3rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
