:root {
  color-scheme: light;
  --paper: #f7f7f2;
  --ink: #181b25;
  --muted: #4e5461;
  --rule: #c9cbd0;
  --blue: #1936da;
  --lime: #e1fb89;
  --peach: #ffb8a4;
  --cream: #fff7de;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }

body { margin: 0; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }

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

.shell {
  width: min(calc(100% - 3rem), 70rem);
  margin-inline: auto;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .375rem 1rem;
  min-height: 4.5rem;
  padding-block: .65rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-height: 2.75rem;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -.045em;
  text-decoration: none;
}

.brand img { border-radius: .3rem; }
.brand:hover span { text-decoration: underline; text-underline-offset: .2em; }

.edition,
.game-type {
  font: 650 .875rem/1.3 ui-monospace, 'Courier New', monospace;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.edition { color: var(--muted); text-align: right; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: 23.75rem;
  overflow: hidden;
  border-radius: .875rem;
  background: var(--blue);
  color: var(--cream);
}

.hero-copy {
  z-index: 1;
  padding: 2.5rem clamp(2rem, 5vw, 4rem);
}

@font-face {
  font-family: 'Drop Display';
  src: local('Impact');
  font-weight: 900;
}

.hero h1 {
  font-family: 'Drop Display', 'Arial Black', system-ui, sans-serif;
  font-size: clamp(4rem, 9.2vw, 8.25rem);
  font-weight: 900;
  line-height: .89;
  letter-spacing: -.025em;
  text-transform: uppercase;
}

.hero h1 span:first-child { display: block; }
.hero-period { color: var(--lime); }

.hero p {
  margin-top: 1.3rem;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 550;
}

.hero-art {
  position: absolute;
  inset: 0 0 0 auto;
  display: grid;
  place-items: center;
  width: 52%;
  background-image:
    linear-gradient(to right, var(--blue), transparent 40%),
    radial-gradient(#ffffff19 1px, transparent 1px);
  background-size: auto, 1.25rem 1.25rem;
  background-position: center;
}

.hero-tiles {
  width: min(85%, 31rem);
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6%;
}

.hero-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 13%;
  background: var(--cream);
  color: var(--ink);
  font-size: clamp(1.125rem, 13cqi, 3.8rem);
  font-weight: 850;
  line-height: 1;
  box-shadow: inset 0 -.075em 0 #171d3830, 0 .08em .18em #11184838;
}

.hero-tile-d { transform: translateY(26%) rotate(11deg); }

.hero-tile-r {
  background: var(--peach);
  transform: translateY(-30%) rotate(-10deg);
}

.hero-tile-o { transform: translateY(21%) rotate(12deg); }

.hero-tile-p {
  background: var(--lime);
  transform: translateY(-40%) rotate(-13deg);
}

.puzzles { margin-block: 1.85rem 2.25rem; }

.puzzles h2 {
  margin-bottom: .8rem;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1.15;
}

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.125rem;
}

.puzzle {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: .875rem;
  background: #fff;
}

.game-art {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 9rem;
  border-bottom: 1px solid var(--rule);
}

.word-art {
  background-color: var(--lime);
  background-image: radial-gradient(#4351273d 1px, transparent 1px);
  background-size: .7rem .7rem;
}

.word-board {
  --cell: 1.92rem;
  display: grid;
  grid-template: repeat(4, var(--cell)) / repeat(7, var(--cell));
  padding: 3px;
  border: 1px solid #11192a;
  border-radius: .35rem;
  background-color: #1d2636;
  background-image:
    linear-gradient(to right, #ffffff26 1px, transparent 1px),
    linear-gradient(to bottom, #ffffff26 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  background-origin: content-box;
  box-shadow: 0 5px 0 #25302144;
  transform: translateY(4%) rotate(-7deg);
}

.letter,
.letter-row span {
  display: grid;
  place-items: center;
  margin: 1.5px;
  border-radius: .16rem;
  background: var(--cream);
  box-shadow: inset 0 -3px 0 #caad7c;
  font: 800 .94rem/1 ui-monospace, monospace;
}

.letter-falling {
  grid-area: 1 / 6;
  background: var(--peach);
  box-shadow: inset 0 -3px 0 #c86d63;
  transform: translateY(-35%) rotate(14deg);
}

.letter-cat { grid-column: 3; }
.letter-cat:nth-child(2) { grid-row: 2; }
.letter-cat:nth-child(3) { grid-row: 3; }

.letter-row {
  grid-area: 4 / 2 / 5 / 7;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.proof-art {
  display: flex;
  justify-content: center;
  gap: 1.15rem;
  background-color: var(--peach);
  background-image: repeating-linear-gradient(0deg, #9c433d26 0 1px, transparent 1px 12px);
}

.proof-sheet {
  width: 6.1rem;
  aspect-ratio: 1;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  gap: 3px;
  padding: .55rem;
  border: 1px solid var(--ink);
  border-radius: .22rem;
  background: var(--cream);
  box-shadow: 0 5px 0 #6f3a363e;
}

.proof-sheet i { border: 1px solid #252b3c58; border-radius: 2px; }
.proof-first { transform: rotate(-11deg) translateY(-5%); }
.proof-second { transform: rotate(10deg) translateY(5%); }

.proof-first i:is(:nth-child(1), :nth-child(4), :nth-child(5), :nth-child(7), :nth-child(9)),
.proof-second i:is(:nth-child(2), :nth-child(3), :nth-child(5), :nth-child(7), :nth-child(8)) {
  background: repeating-linear-gradient(135deg, #202a3c 0 2px, transparent 2px 4px);
}

.puzzle-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.15rem 1.375rem 1.375rem;
}

.game-type { margin-bottom: .35rem; color: var(--muted); }

.puzzle h3 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.1;
}

.game-description {
  flex: 1;
  margin-block: .5rem 1rem;
  color: var(--muted);
}

.play-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .5rem .9rem;
  border-radius: .4rem;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.play-link:hover { background: var(--blue); }

.site-footer {
  padding-block: .85rem 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .875rem;
}

@media (max-width: 47rem) {
  .shell { width: calc(100% - 2rem); }
  .hero { min-height: 18.5rem; }
  .hero-art { width: 50%; }
  .hero-copy { padding-inline: 1.75rem; }
  .puzzle-copy { padding-inline: 1rem; }
}

@media (max-width: 36rem) {
  .masthead { min-height: 3.75rem; }
  .edition { font-size: .75rem; }
  .hero { min-height: 18.25rem; grid-template-rows: auto 1fr; align-items: stretch; }
  .hero-copy { padding: 1.6rem 1.2rem 0; }
  .hero h1 { font-size: clamp(3.25rem, 12vw, 4rem); }
  .hero-art { position: relative; inset: auto; min-height: 7.5rem; width: 100%; }
  .hero-tiles { width: min(76%, 18rem); }
  .hero p { margin-top: 1rem; }
  .puzzle-grid { grid-template-columns: minmax(0, 1fr); }
  .word-board { --cell: 1.75rem; }
}
