@font-face {
  font-family: "AP";
  src: url(./AP.woff2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gap: 0.25rem;
  --padding: 1rem;
  --content-width: min(90vw, 560px);
}

html,
body {
  height: 100%;
  width: 100%;
}

html {
  font-size: clamp(12px, 2.5vw, 20px);
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  display: flex;
  justify-content: center;
  font-family: "AP", monospace;
}

#loading {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: #fff;
}

#loading.is-hidden {
  display: none;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.page {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-header {
  min-height: 100svh;
  opacity: 0;
  width: 100%;
  max-width: var(--content-width);
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;

  .header-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    transform: translateY(-0.5rem);

    h1 {
      font-size: 3rem;
    }

    p {
      font-size: 1.5rem;
    }
  }
}

.page-header.is-visible,
.months > section.is-visible {
  animation: fade-in 1.5s ease-out forwards;
}

.months {
  width: 100%;
  padding: 0 var(--padding);

  > section {
    min-height: 100svh;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;

    h3 {
      width: 100%;
      max-width: var(--content-width);
      padding: 0 var(--padding);
      font-size: 1.5rem;
    }

    .grid {
      display: grid;
      width: 100%;
      max-width: var(--content-width);
      aspect-ratio: 1;
      grid-template-columns: repeat(7, 1fr);
      grid-template-rows: repeat(7, 1fr);
      gap: var(--gap);
      padding: var(--padding);

      .item {
        display: block;
        min-width: 0;
        min-height: 0;
        background-size: cover;
        background-position: center;
        text-decoration: none;

        &:focus-visible {
          outline: 2px solid #111;
          outline-offset: 2px;
        }
      }
    }
  }
}

@media (max-width: 720px) {
  :root {
    --gap: 6px;
  }
}
