@font-face {
  font-family: Iosevka;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/iosevka@5.2.5/files/iosevka-latin-400-normal.woff2")
    format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #000;
  --fg: #fff;
  --flip-half: 500ms;
  --digit-size: clamp(4rem, min(19vw, 26vmin), 17rem);
  --clock-gap: clamp(0.4rem, 2.2vw, 1.25rem);
}

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

html {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--fg);
  font-family: Iosevka, ui-monospace, monospace;
}

.clock {
  display: grid;
  flex-shrink: 0;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: center;
  justify-items: center;
  gap: var(--clock-gap);
  width: min(80vw, calc(100vw - 1rem));
  max-height: 80vh;
  padding: clamp(0.5rem, 2.5vw, 1.25rem);
  box-sizing: border-box;
}

.digit-grid {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  width: min(100%, calc(78vh * 3 / 4));
  max-height: 78vh;
  min-height: 0;
  border: 1px solid #1a1a1a;
  background: #0a0a0a;
  perspective: min(1400px, 120vw);
}

.digit-flip {
  transform-style: preserve-3d;
  transform: rotateX(0deg);
  transition: transform var(--flip-half) ease-in-out;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.digit-char {
  font-size: var(--digit-size);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.colon {
  font-size: calc(var(--digit-size) * 0.55);
  line-height: 1;
  padding: 0 0.1em;
  opacity: 0.85;
  align-self: center;
}

.donation-banner {
  position: fixed;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10dvh;
  min-height: 2.75rem;
  max-height: 10vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(0.75rem, 3vw, 1.5rem);
  background: rgba(5, 5, 5, 0.94);
  border-top: 1px solid #1a1a1a;
  color: #818181;
  font-family: Iosevka, ui-monospace, monospace;
  font-size: clamp(0.7rem, min(2.6vmin, calc(10dvh * 0.26)), 1.25rem);
  line-height: 1.3;
  text-align: center;
  opacity: 1;
  transition: opacity 0.85s ease;
}

.donation-banner__inner {
  margin: 0;
  max-width: 56rem;
}

.donation-banner__link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  word-break: break-all;
}

.donation-banner__link:hover {
  color: #9a9a9a;
}

.donation-banner--fade-out {
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .digit-flip {
    transition: none;
  }

  .donation-banner {
    transition-duration: 0.01ms;
  }
}
