@font-face {font-family: "PT Mono";
  src: url("assets/PTMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;}

:root {
  --red: #641321;
  --ink: #131313;
  --paper: #e5dfd3;
  --white: #f4efe4;
  --line: #aba294;
  --gutter: clamp(24px, 6.25vw, 120px);
  --space: clamp(64px, 6.25vw, 120px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "PT Mono", monospace;
  font-size: clamp(16px, 1.98vw, 38px);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.35;
}

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

h1, h2, h3, th {
  font-weight: 400;
}

a {
  color: inherit;
}

input, button {
  font: inherit;
}

::selection {
  background: var(--red);
  color: var(--white);
}

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 6px;
}

.site {
  position: relative;
  width: 100%;
  max-width: 1920px;
  margin: auto;
  overflow: clip;
}

.wrap {
  margin-inline: var(--gutter);
}

.section {
  padding-block: var(--space);
}

h2 {
  margin-bottom: clamp(32px, 3.75vw, 72px);
  font-size: clamp(32px, 5.625vw, 108px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.eyebrow {
  font-size: clamp(13px, 1.67vw, 32px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hero {
  padding-block: clamp(48px, 4.16vw, 80px) clamp(32px, 3.33vw, 64px);
  background: var(--red);
  color: var(--white);
}

.title-cells {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-top: clamp(32px, 3.75vw, 72px);
  border: 1px solid #b18e8f;
  font-size: clamp(42px, 16.25vw, 312px);
  line-height: 1.28;
  text-align: center;
  isolation: isolate;
}

.title-cells::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, transparent calc(100% - 1px), #b18e8f 0);
  background-size: calc(100% / 7) 100%;
  pointer-events: none;
}

.title-cells span {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 240 / 416;
  animation: typeset 1ms steps(1, end) both;
  animation-delay: calc(var(--i) * 120ms);
}

.title-cells span:hover {
  background: var(--white);
  color: var(--red);
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 24px;
  margin-top: clamp(56px, 5.2vw, 100px);
}

.hero-copy {
  font-size: clamp(36px, 4.8vw, 92px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.identity-stack {
  position: relative;
  justify-self: end;
  width: 80%;
  margin-bottom: 12px;
  padding-bottom: clamp(50px, 6.25vw, 120px);
}

.id-card {
  position: relative;
  padding: clamp(10px, 1.46vw, 28px);
  background: var(--white);
  color: var(--ink);
  box-shadow: 5px 7px 0 var(--line);
  transform: rotate(5deg);
  transition: transform 0.45s;
}

.identity-stack:hover .id-card {
  transform: rotate(0) translateY(-8px);
}

.paper-bar {
  padding: 0.2em 0.45em;
  background: var(--ink);
  color: var(--white);
  font-size: clamp(12px, 1.98vw, 38px);
  line-height: 1.2;
}

.id-card .paper-bar {
  font-size: clamp(13px, 1.4vw, 27px);
}

.id-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8%;
  padding-top: 14px;
}

.portrait {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(transparent 0 19%, var(--line) 20%);
  font-size: clamp(90px, 13.3vw, 255px);
  line-height: 1;
  text-align: center;
}

.id-body dl {
  margin: 0;
  font-size: clamp(14px, 1.46vw, 28px);
  text-transform: uppercase;
}

.id-body dt {
  margin-top: 0.55em;
}

.id-body dd {
  margin: 0.2em 0 0.7em;
}

.code {
  color: var(--red);
}

.clip {
  position: absolute;
  top: -18px;
  right: 12%;
  width: 24px;
  height: 64px;
  background: url("assets/paperclip.svg") center / contain no-repeat;
  transform: rotate(23deg);
  pointer-events: none;
}

.application .clip {
  transform: rotate(23deg);
}

.stamp {
  position: absolute;
  bottom: -12px;
  left: -7%;
  width: 112%;
  padding: 0.35em;
  border: 2px solid currentColor;
  outline: 1px solid currentColor;
  outline-offset: -7px;
  font-size: clamp(14px, 2.14vw, 41px);
  text-align: center;
  transform: rotate(-5deg);
  animation: stamp-in 0.55s 1.1s both;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 8%;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #b18e8f;
  font-size: clamp(13px, 1.875vw, 36px);
}

.hero-meta a {
  margin-left: auto;
  font-size: 1.5em;
  text-decoration: none;
}

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

.timeline article + article {
  border-left: 1px solid var(--ink);
}

.timeline h3 {
  padding: clamp(16px, 1.46vw, 28px);
  border-bottom: 1px solid var(--ink);
  color: var(--red);
  font-size: clamp(42px, 8.44vw, 162px);
  line-height: 1.35;
  letter-spacing: -0.04em;
}

.timeline p {
  min-height: 5.9em;
  padding: clamp(16px, 1.46vw, 28px);
  font-size: clamp(14px, 1.875vw, 36px);
  line-height: 1.45;
}

.authors {
  margin: clamp(32px, 4.16vw, 80px) 0 24px;
  border: 1px solid var(--ink);
}

.authors > div {
  display: grid;
  grid-template-columns: 25% 75%;
}

.authors > div + div {
  border-top: 1px solid var(--ink);
}

.authors dt {
  display: flex;
  align-items: center;
  padding: clamp(14px, 1.67vw, 32px);
  color: var(--red);
  font-size: clamp(13px, 1.67vw, 32px);
  text-transform: uppercase;
}

.authors dd {
  padding: clamp(20px, 2.5vw, 48px) clamp(14px, 2.08vw, 40px);
  border-left: 1px solid var(--ink);
  font-size: clamp(19px, 3.23vw, 62px);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.width-section {
  padding-top: 32px;
}

#width-title {
  font-size: clamp(16px, 5.1vw, 98px);
  white-space: nowrap;
}

.width-table {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(24px, 3vw, 58px);
}

.specimen {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 560 / 448;
  border: 1px solid var(--ink);
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(20% - 1px), #aba29466 calc(20% - 1px) 20%);
  overflow: hidden;
}

.width-item + .width-item .specimen {
  border-left: 0;
}

.specimen > span {
  display: block;
  font-size: clamp(90px, 21.875vw, 420px);
  line-height: 1;
  animation: typeset 1s both;
  transition: transform 0.5s;
}

.width-item:nth-child(2) .specimen {
  background-color: var(--red);
  color: var(--white);
}

.width-item:hover .specimen > span,
.width-item:focus-visible .specimen > span {
  transform: translateY(-8%);
}

.measure {
  position: absolute;
  bottom: 6%;
  left: 27.5%;
  width: 45%;
  height: 10px;
  border-inline: 2px solid;
  border-bottom: 2px solid;
  transition: bottom 0.5s;
}

.width-item:hover .measure,
.width-item:focus-visible .measure {
  bottom: 14%;
}

.recognition {
  background: var(--red);
  color: var(--white);
}

.recognition-table {
  border: 1px solid #b18e8f;
}

.recognition-row {
  display: grid;
  grid-template-columns: 43.5% 56.5%;
  min-height: clamp(120px, 13.54vw, 260px);
  transition: background 0.25s, color 0.25s;
}

.recognition-row + .recognition-row {
  border-top: 1px solid #b18e8f;
}

.recognition-row:nth-child(2) {
  background: var(--paper);
  color: var(--red);
}

.recognition-row:hover,
.recognition-row:focus-visible {
  background: var(--white);
  color: var(--red);
}

.letter-pair {
  display: grid;
  align-items: center;
  border-right: 1px solid #b18e8f;
  font-size: clamp(46px, 9.79vw, 188px);
  text-align: center;
  white-space: pre;
}

.recognition-row p {
  align-self: center;
  padding: clamp(16px, 2.6vw, 50px);
  font-size: clamp(16px, 2.5vw, 48px);
}

.check-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin-top: clamp(28px, 3.6vw, 70px);
  font-size: clamp(20px, 2.92vw, 56px);
  cursor: pointer;
}

.check-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.check-box {
  position: relative;
  display: block;
  flex: none;
  width: 1.3em;
  height: 1.3em;
  border: 2px solid;
}

.check-box::after {
  content: "";
  position: absolute;
  top: 9%;
  left: 24%;
  width: 35%;
  height: 62%;
  border-right: 3px solid;
  border-bottom: 3px solid;
  transform: rotate(40deg);
  clip-path: inset(100% 0 0);
  transition: clip-path 0.3s;
}

.check-label input:checked + .check-box::after {
  clip-path: inset(0);
}

.check-label input:focus-visible + .check-box {
  outline: 3px solid;
  outline-offset: 6px;
}

.alphabet {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.alphabet h3,
.language-samples span {
  margin-bottom: 16px;
  color: var(--red);
  font-size: clamp(13px, 1.67vw, 32px);
  text-transform: uppercase;
}

.glyph-line {
  display: flex;
  flex-wrap: wrap;
  font-size: clamp(26px, 3.96vw, 76px);
  line-height: 1.35;
}

.glyph-line span {
  transition: color 0.2s, background 0.2s, translate 0.2s;
}

.glyph-line span:hover {
  background: var(--red);
  color: var(--white);
  translate: 0 -10%;
}

.latin .glyph-line {
  font-size: clamp(29px, 4.58vw, 88px);
}

.numbers {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px 20px;
  font-size: clamp(34px, 6.6vw, 126px);
  letter-spacing: -0.03em;
}

.number-sequence,
.symbol-sequence {
  display: inline-flex;
  white-space: nowrap;
}

.symbol-sequence {
  gap: 0.3em;
  color: var(--red);
}

.numbers > span > span {
  display: inline-block;
  animation: glyph-flash 4.8s steps(1, end) infinite;
  animation-delay: calc(var(--n) * 120ms);
}

.glyph-count {
  display: flex;
  align-items: center;
  gap: 6%;
  padding: 12px 32px;
  background: var(--red);
  color: var(--white);
}

.glyph-count > span {
  font-size: clamp(56px, 7.08vw, 136px);
  line-height: 1.1;
}

.glyph-count p {
  font-size: clamp(18px, 2.7vw, 52px);
}

.language-samples {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  font-size: clamp(14px, 1.67vw, 32px);
}

.language-samples span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85em;
}

.documents {
  padding-top: 24px;
  padding-bottom: clamp(100px, 8.33vw, 160px);
}

.documents h2 {
  font-size: clamp(30px, 5.2vw, 100px);
}

.documents-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  align-items: stretch;
  gap: 24px;
}

.paper {
  position: relative;
  padding: clamp(16px, 1.67vw, 32px);
  border: 1px solid var(--ink);
  background: var(--white);
  box-shadow: 8px 10px 0 var(--line);
  transform: rotate(-1deg);
  transition: transform 0.4s, box-shadow 0.4s;
}

.paper:hover,
.paper:focus-within {
  box-shadow: 10px 18px 0 var(--line);
  transform: rotate(0) translateY(-8px);
}

.paper > label:not(.check-label) {
  display: block;
  margin-block: 1em 0.4em;
  color: var(--red);
  font-size: clamp(13px, 1.67vw, 32px);
}

.paper input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}

.paper input.surname {
  height: 1.35em;
  padding-left: 0.2em;
  border: 1px solid var(--ink);
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(12.5% - 1px), var(--ink) calc(12.5% - 1px) 12.5%);
  font-size: clamp(24px, 4.27vw, 82px);
  line-height: 1.3;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

.paper input.given-name {
  padding-bottom: 0.12em;
  border-bottom: 1px solid var(--line);
  font-size: clamp(40px, 6.14vw, 118px);
}

.application {
  container-type: inline-size;
}

.application .check-label {
  margin-block: 1em 0.2em;
  color: var(--red);
  font-size: clamp(24px, 2.92vw, 56px);
}

.accepted-stamp {
  position: absolute;
  right: 5%;
  bottom: 10%;
  padding: 0.5em;
  border: 2px solid;
  color: var(--red);
  font-size: clamp(11px, 1.4vw, 27px);
  transform: rotate(-12deg);
  opacity: 0;
  pointer-events: none;
}

.application:has(.accepted input:checked) .accepted-stamp {
  opacity: 1;
  animation: stamp-in 0.4s both;
}

.invoice {
  transform: rotate(1deg);
}

.invoice .paper-bar {
  background: var(--red);
}

table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  font-size: clamp(16px, 1.875vw, 36px);
}

th {
  text-align: left;
}

td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

tr {
  border-bottom: 1px solid var(--line);
}

tbody th,
tbody td {
  padding-block: clamp(18px, 2vw, 38px);
}

tbody tr {
  transition: background 0.2s;
}

tbody tr:hover {
  background: var(--paper);
}

tfoot tr {
  border: 0;
  color: var(--red);
}

tfoot th {
  font-size: 0.9em;
}

tfoot td {
  padding-top: 1em;
  font-size: clamp(23px, 3.33vw, 64px);
}

.footer {
  padding-block: clamp(48px, 4.16vw, 80px);
  background: var(--red);
  color: var(--white);
}

.download {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 24px;
  font-size: clamp(25px, 4.2vw, 80px);
  line-height: 1.2;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.download span {
  display: block;
  transition: translate 0.3s;
}

.download:hover span {
  translate: 10px -10px;
}

.download-arrow {
  position: relative;
  flex: none;
  width: 0.75em;
  height: 0.75em;
  margin-top: 0.12em;
}

.download-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  border-top: 3px solid currentColor;
  transform: rotate(-45deg);
}

.download-arrow::after {
  content: "";
  position: absolute;
  top: 13%;
  right: 13%;
  width: 55%;
  height: 55%;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
}

.footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto 40px;
  align-items: end;
  gap: 32px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid #b18e8f;
  font-size: clamp(14px, 1.67vw, 32px);
}

.footer-bottom > a {
  font-size: 1.8em;
  text-decoration: none;
}

.credit {
  font-size: clamp(14px, 1.5vw, 28px);
  line-height: 1.6;
}

.skip {
  position: fixed;
  top: -100px;
  z-index: 50;
  padding: 16px;
  background: var(--white);
}

.skip:focus {
  top: 10px;
}

.sr-only,
.motion-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.motion-label {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 20;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  cursor: pointer;
}

.motion-toggle:focus-visible + .motion-label {
  outline: 3px solid var(--paper);
  outline-offset: 3px;
}

.motion-toggle:checked + .motion-label {
  background: var(--paper);
  color: var(--ink);
}

.motion-toggle:checked ~ .site *,
.motion-toggle:checked ~ .site *::before,
.motion-toggle:checked ~ .site *::after {
  animation: none !important;
  transition: none !important;
}

.motion-toggle:checked ~ .site .numbers > span > span {
  opacity: 1;
}

@keyframes typeset {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes stamp-in {
  0% {
    opacity: 0;
    scale: 1.12;
  }
  65% {
    opacity: 1;
    scale: 0.98;
  }
  100% {
    opacity: 1;
    scale: 1;
  }
}

@keyframes glyph-flash {
  0% {
    opacity: 1;
  }
  8% {
    opacity: 0.15;
  }
  16%, 100% {
    opacity: 1;
  }
}

@supports (font-size: 1cqw) {
  .paper input.surname {
    height: 14cqw;
    padding-left: 3.7cqw;
    font-size: 8.5cqw;
    letter-spacing: 7.4cqw;
  }
}

@supports (animation-timeline: view()) {
  .specimen > span {
    animation: typeset linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 90%;
  }

  .timeline article {
    animation: typeset linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 65%;
  }
}

@media (max-width: 700px) {
  .title-cells {
    font-size: clamp(28px, 15vw, 105px);
  }

  .title-cells span {
    aspect-ratio: 1 / 1.6;
  }

  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-copy {
    font-size: clamp(36px, 7vw, 49px);
  }

  .identity-stack {
    justify-self: center;
    width: min(100%, 380px);
    padding-bottom: 80px;
  }

  .id-card {
    padding: 16px;
  }

  .id-card .paper-bar {
    font-size: 16px;
  }

  .id-body dl {
    font-size: 14px;
  }

  .id-body dd {
    overflow-wrap: anywhere;
  }

  .portrait {
    font-size: clamp(140px, 40vw, 190px);
  }

  .clip {
    top: -15px;
    width: 20px;
    height: 54px;
  }

  .stamp {
    font-size: 18px;
  }

  .hero-meta {
    flex-wrap: wrap;
    gap: 16px;
  }

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

  .timeline article {
    display: grid;
    grid-template-columns: 30% 70%;
  }

  .timeline article + article {
    border-top: 1px solid var(--ink);
    border-left: 0;
  }

  .timeline h3 {
    display: grid;
    place-items: center;
    padding: 12px;
    border-right: 1px solid var(--ink);
    border-bottom: 0;
    font-size: clamp(32px, 7vw, 48px);
  }

  .timeline p {
    min-height: 0;
    padding: 18px;
    font-size: 16px;
  }

  .authors > div {
    grid-template-columns: 1fr;
  }

  .authors dt {
    padding-bottom: 0;
  }

  .authors dd {
    padding-top: 10px;
    border-left: 0;
    font-size: clamp(18px, 4.6vw, 28px);
  }

  .specimen > span {
    font-size: clamp(72px, 20vw, 140px);
  }

  .recognition-row {
    grid-template-columns: 46% 54%;
  }

  .letter-pair {
    font-size: clamp(30px, 7.5vw, 52px);
  }

  .recognition-row p {
    padding: 14px;
    font-size: 15px;
  }

  .numbers {
    font-size: clamp(26px, 6.6vw, 46px);
  }

  .glyph-count {
    gap: 20px;
    padding: 16px;
  }

  .glyph-count p {
    font-size: 16px;
  }

  .language-samples {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .language-samples p {
    font-size: 18px;
  }

  .documents-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .paper {
    padding: 20px;
  }

  .paper .paper-bar {
    font-size: 20px;
  }

  .paper input.given-name {
    font-size: 56px;
  }

  .invoice table {
    font-size: 20px;
  }

  .invoice td {
    padding-block: 20px;
  }

  .accepted-stamp {
    font-size: 12px;
  }

  .footer {
    padding-bottom: 80px;
  }

  .download {
    gap: 12px;
    font-size: clamp(21px, 5.3vw, 37px);
  }

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

  .footer-bottom > p:first-child {
    grid-column: 1 / -1;
  }

  .footer-bottom br {
    display: none;
  }

  .footer-bottom .credit {
    font-size: 16px;
  }

  .credit br {
    display: block;
  }
}

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

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  .motion-label {
    display: none;
  }

  .numbers > span > span {
    opacity: 1;
  }
}

@media print {
  .motion-label,
  .skip {
    display: none;
  }

  .site {
    overflow: visible;
  }

  .paper {
    transform: none;
  }

  .section {
    break-inside: avoid;
  }

  *, *::before, *::after {
    animation: none !important;
  }
}
