:root {
  --paper: #f3efe5;
  --paper-deep: #e8e0cf;
  --ink: #17243f;
  --blue: #2f74c8;
  --blue-light: #8ac6ef;
  --red: #c8392e;
  --black: #181714;
  --shadow: rgba(23, 36, 63, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    repeating-linear-gradient(3deg, transparent 0 5px, rgba(23, 36, 63, 0.018) 5px 6px),
    var(--paper);
  font-family: "Courier New", Courier, monospace;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.34;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.site-header,
.site-footer {
  width: min(1380px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  border-bottom: 3px solid var(--ink);
}

.wordmark {
  position: relative;
  display: inline-block;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  text-decoration: none;
}

.wordmark::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -7px;
  left: -5px;
  height: 5px;
  background: var(--red);
  transform: rotate(-1.5deg);
}

.social-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.7rem, 2.3vw, 2.2rem);
}

.social-nav a {
  padding: 0.35rem 0.1rem;
  border-bottom: 2px solid transparent;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.social-nav a:hover {
  color: var(--blue);
  border-color: currentColor;
  transform: rotate(-2deg);
}

.hero {
  position: relative;
  overflow: clip;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 8rem);
  width: min(1280px, calc(100% - 64px));
  min-height: calc(100vh - 174px);
  margin: 0 auto;
  padding: 4rem 0 5rem;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 1.2rem;
  padding: 0.35rem 0.65rem;
  color: var(--paper);
  background: var(--red);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-1.5deg);
}

h1 {
  margin: 0;
  color: var(--ink);
  font-family: Arial Black, Impact, sans-serif;
  font-size: clamp(4.7rem, 10vw, 9.5rem);
  font-weight: 900;
  letter-spacing: -0.085em;
  line-height: 0.73;
  text-transform: uppercase;
  transform: scaleX(0.93);
  transform-origin: left center;
  text-shadow: 4px 4px 0 var(--blue-light);
}

h1 span {
  color: var(--red);
  text-shadow: 3px 3px 0 #e69a7e;
}

.intro {
  max-width: 32rem;
  margin: 2.2rem 0 2.3rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.18rem, 2.2vw, 1.65rem);
  font-style: italic;
  line-height: 1.35;
}

.contract-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  max-width: 34rem;
  padding: 1rem 1rem 1rem 1.2rem;
  border: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 7px 7px 0 var(--blue-light);
  transform: rotate(0.4deg);
}

.contract-card::before {
  content: "";
  position: absolute;
  inset: 4px -5px -5px 5px;
  z-index: -1;
  border: 1px solid var(--ink);
  transform: rotate(-0.7deg);
}

.contract-label,
.contract-card code {
  display: block;
}

.contract-label {
  margin-bottom: 0.32rem;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.contract-card code {
  overflow: hidden;
  font-size: 1.05rem;
  font-weight: 800;
  text-overflow: ellipsis;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--ink);
  color: var(--paper);
  background: var(--ink);
  cursor: pointer;
  font-weight: 900;
  transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.copy-button:hover {
  color: var(--ink);
  background: var(--blue-light);
  transform: rotate(-2deg);
}

.copy-mark {
  color: var(--red);
  font-size: 1.25rem;
}

.copy-status {
  position: absolute;
  top: calc(100% + 0.65rem);
  left: 0.3rem;
  min-height: 1.1rem;
  margin: 0;
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 900;
}

.portrait-card {
  position: relative;
  z-index: 1;
  width: min(100%, 610px);
  margin: 0;
  justify-self: end;
  padding: clamp(0.6rem, 1.4vw, 1rem) clamp(0.6rem, 1.4vw, 1rem) 0;
  border: 2px solid rgba(23, 36, 63, 0.7);
  background: #f7f4eb;
  box-shadow: 16px 18px 0 var(--shadow);
  transform: rotate(2.1deg);
}

.portrait-card::before,
.portrait-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 3px solid var(--blue);
  border-radius: 50%;
}

.portrait-card::before {
  width: 116%;
  height: 65%;
  top: 15%;
  left: -9%;
  transform: rotate(-5deg);
}

.portrait-card::after {
  width: 108%;
  height: 73%;
  top: 10%;
  left: -5%;
  opacity: 0.55;
  transform: rotate(8deg);
}

.portrait-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid rgba(23, 36, 63, 0.35);
  filter: saturate(0.94) contrast(1.02);
}

.portrait-card figcaption {
  padding: 0.65rem 0.1rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.tape {
  position: absolute;
  z-index: 3;
  width: 98px;
  height: 30px;
  opacity: 0.76;
  background: #e7d690;
  box-shadow: 0 1px 2px rgba(23, 36, 63, 0.12);
}

.tape-one {
  top: -10px;
  left: 9%;
  transform: rotate(-8deg);
}

.tape-two {
  right: 8%;
  bottom: 24px;
  transform: rotate(7deg);
}

.margin-note {
  position: absolute;
  z-index: 3;
  margin: 0;
  color: var(--red);
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
  font-size: 1rem;
  font-weight: 700;
}

.margin-note-one {
  top: 7%;
  right: 3%;
  transform: rotate(8deg);
}

.margin-note-two {
  right: 43%;
  bottom: 8%;
  transform: rotate(-7deg);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.3rem 0 1.7rem;
  border-top: 3px solid var(--ink);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.site-footer p {
  margin: 0;
}

:focus-visible {
  outline: 4px solid var(--red);
  outline-offset: 4px;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr 0.9fr;
    gap: 2.5rem;
    width: min(100% - 42px, 820px);
    min-height: auto;
    padding: 4.5rem 0 5rem;
  }

  h1 {
    font-size: clamp(4rem, 12vw, 7rem);
  }

  .portrait-card {
    width: 100%;
  }

  .margin-note-two {
    display: none;
  }
}

@media (max-width: 680px) {
  .site-header,
  .site-footer {
    width: calc(100% - 32px);
  }

  .site-header {
    min-height: 76px;
  }

  .social-nav {
    gap: 0.75rem;
  }

  .social-nav a {
    font-size: 0.78rem;
  }

  .hero {
    grid-template-columns: 1fr;
    width: calc(100% - 36px);
    padding: 3.2rem 0 4.3rem;
  }

  h1 {
    font-size: clamp(4.4rem, 26vw, 7rem);
  }

  .intro {
    max-width: 26rem;
  }

  .portrait-card {
    grid-row: 1;
    width: min(88vw, 470px);
    margin-inline: auto;
    justify-self: center;
    transform: rotate(1.4deg);
  }

  .hero-copy {
    grid-row: 2;
  }

  .margin-note-one {
    top: 2.5%;
    right: 0;
  }

  .contract-card {
    max-width: none;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 410px) {
  .site-header {
    align-items: flex-start;
    min-height: 90px;
    padding-top: 1.15rem;
  }

  .social-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 145px;
  }

  .hero {
    width: calc(100% - 28px);
    padding-top: 2.6rem;
  }

  .contract-card {
    grid-template-columns: 1fr;
  }

  .copy-button {
    justify-content: center;
    width: 100%;
  }
}

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

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