@import url("https://fonts.googleapis.com/css2?family=Fontdiner+Swanky&display=swap");

@property --pixel-paint-colors {
  syntax: "<color>#";
  initial-value: #f8fafc, #f1f5f9, #cbd5e1;
  inherits: false;
}

@property --pixel-paint-gap {
  syntax: "<number>";
  initial-value: 4;
  inherits: false;
}

@property --pixel-paint-progress {
  syntax: "<number>";
  initial-value: 0;
  inherits: true;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  display: grid;
  color: white;
  font-family: system-ui, sans-serif;
}

main {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  place-items: center;
  place-content: center;
  background: #09090b;
}

h1 {
  --_deg: -10deg;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-block: 3vmin;
  font-size: 15vmin;
  font-family: "Fontdiner Swanky", serif;
  text-align: center;
  rotate: var(--_deg);
  transform: skew(var(--_deg));

  > :nth-child(1) {
    grid-column: 1 / -1;
  }

  > :nth-child(2) {
    -webkit-margin-before: -0.25em;
            margin-block-start: -0.25em;
  }

  > :nth-child(3) {
    -webkit-margin-before: -0.07em;
            margin-block-start: -0.07em;
  }

  .tada {
    font-size: 1.25em;
    grid-column: 1 / -1;
    grid-row: 3;
    -webkit-margin-before: -0.16em;
            margin-block-start: -0.16em;
    -webkit-margin-start: -0.75em;
            margin-inline-start: -0.75em;
  }

  .year {
    grid-column: 2;
    grid-row: 3;
    -webkit-margin-start: 0.4em;
            margin-inline-start: 0.4em;
    font-size: 0.5em;
    letter-spacing: 0.02em;
  }
}

.no-support {
  line-height: 1.4;
  text-align: center;
  color: black;
  background-color: papayawhip;
  padding: 1rem;
  border-radius: 0.25rem;
}

@supports (background-image: paint(pixel-paint)) {
  .no-support {
    display: none;
  }

  main {
    --pixel-paint-colors: #09090b, #18181b, #27272a;
    --pixel-paint-gap: 8;
    background-image: paint(pixel-paint);
    -webkit-animation: 1s steps(10) infinite sparkle;
            animation: 1s steps(10) infinite sparkle;
  }

  h1 {
    color: transparent;
    -webkit-background-clip: text;
            background-clip: text;
    background-image: paint(pixel-paint);
  }

  @-webkit-keyframes sparkle {
    to {
      --pixel-paint-progress: 1;
    }
  }

  @keyframes sparkle {
    to {
      --pixel-paint-progress: 1;
    }
  }
}