:root {
  color-scheme: light;
  --paper: #f2ead8;
  --paper-deep: #e6d8b9;
  --paper-light: #fff8e8;
  --ink: #17130c;
  --muted: #5f584a;
  --red: #b51f1f;
  --blue: #113c68;
  --green: #476a3f;
  --gold: #c8942d;
  --line: #17130c;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  background:
    linear-gradient(90deg, rgba(23, 19, 12, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(23, 19, 12, 0.05) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.16) 0,
      rgba(255, 255, 255, 0.16) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: multiply;
}

a {
  color: inherit;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto;
  border: 3px solid var(--line);
  background: rgba(242, 234, 216, 0.92);
  box-shadow: 10px 10px 0 var(--blue);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  border-bottom: 3px solid var(--line);
  background: var(--paper-deep);
}

.brand,
nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
}

.brand-box {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 3px solid var(--line);
  background: var(--red);
  color: white;
  font-family: "Courier New", monospace;
  font-size: 18px;
  letter-spacing: 0;
  box-shadow: 4px 4px 0 var(--gold);
}

nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  font-family: "Courier New", monospace;
  font-size: 14px;
  text-transform: uppercase;
}

nav a {
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.hero {
  min-height: 72vh;
  display: grid;
  align-content: center;
  padding: 72px 42px 44px;
  border-bottom: 3px solid var(--line);
  background:
    linear-gradient(135deg, transparent 0 77%, rgba(181, 31, 31, 0.12) 77% 100%),
    var(--paper);
}

.stamp {
  width: max-content;
  margin: 0 0 22px;
  padding: 8px 12px;
  border: 2px solid var(--red);
  color: var(--red);
  font-family: "Courier New", monospace;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

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

h1 {
  max-width: 940px;
  margin-bottom: 22px;
  font-size: clamp(46px, 8vw, 96px);
  line-height: 0.92;
  letter-spacing: 0;
}

.lead {
  max-width: 790px;
  margin-bottom: 36px;
  color: var(--muted);
  font-size: 23px;
  line-height: 1.45;
}

.hero-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 2px solid var(--line);
  background: var(--blue);
  color: white;
  font-family: "Courier New", monospace;
  font-size: 13px;
  text-transform: uppercase;
}

.hero-strip span {
  padding: 14px 10px;
  text-align: center;
}

.hero-strip span + span {
  border-left: 2px solid var(--paper);
}

.section {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  padding: 48px 42px;
  border-bottom: 3px solid var(--line);
}

.section:last-child {
  border-bottom: 0;
}

.section-head p {
  margin-bottom: 8px;
  color: var(--red);
  font-family: "Courier New", monospace;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 0;
  font-size: 38px;
  line-height: 1;
}

.service-grid,
.portfolio-grid {
  display: grid;
  gap: 14px;
}

.service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portfolio-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

article {
  min-height: 230px;
  padding: 22px;
  border: 3px solid var(--line);
  background: var(--paper-light);
}

article:nth-child(2),
.portfolio-card:nth-child(5) {
  background: #eef2e0;
}

article:nth-child(3),
.portfolio-card:nth-child(4) {
  background: #f4e5dd;
}

article:nth-child(4),
.portfolio-card:nth-child(6) {
  background: #edf0f2;
}

article span {
  display: inline-block;
  margin-bottom: 38px;
  font-family: "Courier New", monospace;
  color: var(--red);
  font-weight: 700;
}

h3 {
  margin-bottom: 12px;
  font-size: 24px;
  line-height: 1.05;
}

article p,
.copy p,
.contact-panel p,
dd {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.portfolio-card {
  min-height: 250px;
}

.portfolio-card.featured {
  grid-column: span 2;
  background: var(--paper-deep);
}

.copy,
.contact-panel {
  max-width: 820px;
}

.contact-panel {
  padding: 28px;
  border: 3px solid var(--line);
  background: var(--paper-deep);
}

dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0 0;
  overflow: hidden;
  border: 2px solid var(--line);
  background: var(--line);
}

dl div {
  padding: 18px;
  background: var(--paper-light);
}

dt {
  margin-bottom: 6px;
  color: var(--blue);
  font-family: "Courier New", monospace;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 960px) {
  .service-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-card.featured {
    grid-column: span 1;
  }
}

@media (max-width: 820px) {
  .page {
    width: calc(100% - 20px);
    margin: 10px auto;
    box-shadow: 6px 6px 0 var(--blue);
  }

  .masthead,
  .section {
    grid-template-columns: 1fr;
  }

  .masthead {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    padding: 48px 22px 30px;
  }

  .lead {
    font-size: 19px;
  }

  .hero-strip,
  .service-grid,
  .portfolio-grid,
  dl {
    grid-template-columns: 1fr;
  }

  .hero-strip span + span {
    border-top: 2px solid var(--paper);
    border-left: 0;
  }

  .section {
    padding: 36px 22px;
  }
}
