@font-face {
  font-family: "Inter";
  src: url("assets/inter-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* One grey for the logo, the icons and the names. */
  --ink: #b3b3b3;
  --quiet: #b3b3b3;
}

html,
body {
  margin: 0;
  background: #fff;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--quiet);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

/* Page frame */

.root {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
  /* The load animation starts rows 24px lower; without this the footer pokes
     below the screen for a moment and the scrollbar flashes. */
  overflow: clip;
}

.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Load animation: fade in and rise, one row after another */

@keyframes appear {
  from {
    opacity: 0;
    translate: 0 24px;
  }
}

.link,
.footer,
.policy {
  animation: appear 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: var(--delay, 0.3s);
}

/* The middle of the screen: the shop and Patreon. They sit a little above the centre,
   which reads as the centre once the icons and the footer take the bottom. */

.links {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 4.8vh, 48px);
  width: 100%;
  padding: clamp(20px, 5vh, 56px) 0 clamp(40px, 12vh, 120px);
}

.link {
  display: block;
  transition:
    opacity 0.25s ease,
    scale 0.35s cubic-bezier(0.44, 0, 0.56, 1);
}
a.link:hover,
a.link:focus-visible {
  opacity: 0.7;
  scale: 1.04;
}

.shop {
  --delay: 0.15s;
  width: min(60vw, 250px);
}
.shop img {
  width: 100%;
  height: auto;
}

.patreon {
  --delay: 0.25s;
}
.patreon img {
  width: min(48vw, 200px);
  height: auto;
}

/* The social networks: small icons in one row, just above the footer. */
.socials {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin: 0;
  padding: 0 0 clamp(10px, 2.4vh, 24px);
  list-style: none;
}
.socials img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.socials li:nth-child(1) .link { --delay: 0.4s; }
.socials li:nth-child(2) .link { --delay: 0.48s; }
.socials li:nth-child(3) .link { --delay: 0.56s; }
.socials li:nth-child(4) .link { --delay: 0.64s; }

/* Footer */

.footer {
  --delay: 0.8s;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 0;
  font-size: 15px;
  line-height: 1.2;
  white-space: pre;
}

.footer a {
  position: relative;
  overflow: hidden;
}
.footer a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(107, 107, 107, 0.46);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease;
}
.footer a:hover::before,
.footer a:focus-visible::before {
  transform: scaleX(1);
  transform-origin: bottom left;
}
.footer a span {
  position: relative;
}

/* Privacy page */

.policy {
  --delay: 0.3s;
  width: 100%;
  margin: auto 0;
  padding: 40px 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -0.2px;
  text-align: justify;
}
.policy h1,
.policy h2 {
  margin: 0;
  font: inherit;
}
.policy h1 {
  margin-bottom: 20px;
  text-align: center;
}
.policy p {
  margin: 0;
}
.policy section + section {
  margin-top: 20px;
}

@media (max-width: 809.98px) {
  .footer {
    gap: 16px;
  }
  .home .footer {
    margin-bottom: 7px;
  }
  .main.text {
    max-width: none;
    padding: 84px 4px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .link,
  .footer,
  .policy {
    animation: none;
  }
  .link {
    transition: none;
  }
}
