@font-face {
  font-family: "EB Garamond";
  src: url("./eb-garamond.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --paper: #fcfbf7;
  color: #050724;
  background: var(--paper);
  font-family: "EB Garamond", Garamond, serif;
}

body {
  margin: 0;
}

main {
  position: relative;
  display: grid;
  grid-template-rows: 1.12fr 1fr 0.66fr;
  justify-items: center;
  align-items: center;
  box-sizing: border-box;
  background: var(--paper);
  overflow: hidden;
  min-height: max(43rem, 100svh);
  padding: clamp(2.5rem, 6svh, 5rem) 1rem clamp(1.5rem, 4svh, 3rem);
}

h1 {
  grid-row: 1;
  margin: 0;
  text-align: center;
  font-weight: 400;
  font-size: clamp(4.9rem, 13vw, 9rem);
  line-height: 0.82;
  letter-spacing: -0.058em;
}

h1 span {
  display: block;
}

h1 span:first-child {
  margin-bottom: 0.15em;
  font-size: 0.64em;
  letter-spacing: -0.045em;
}

.figure {
  grid-row: 2;
  display: grid;
  place-items: center;
  width: min(70vw, clamp(12rem, 30svh, 17rem));
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  color: inherit;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.figure-art {
  --frame-ratio: calc(414 / 413);
  --sprite: url("./centergifs/cgif1.png?v=95f59a5d1001");

  width: min(100%, calc(100% * var(--frame-ratio)));
  aspect-ratio: var(--frame-ratio);
  background: var(--sprite) left center / 900% 100% no-repeat;
}

.figure:focus-visible {
  outline: 1px dashed currentColor;
  outline-offset: 0.35rem;
}

@media (max-width: 40rem) {
  main {
    min-height: max(38rem, 100svh);
    padding-top: 4.25rem;
    grid-template-rows: 1.1fr 1fr 0.7fr;
  }
}
