@charset "UTF-8";

:root {
  color-scheme: dark;
  --surface: #070709;
  --text-start: #77797e;
  --text-middle: #f0f0f2;
  --text-end: #77797e;
}

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

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--surface);
  font-family: "Montserrat", "Avenir Next", Avenir, sans-serif;
}

.offline {
  position: relative;
  isolation: isolate;
  display: grid;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(37, 38, 43, 0.22) 0%, rgba(15, 15, 18, 0.08) 32%, transparent 60%),
    linear-gradient(145deg, #111216 0%, #070709 46%, #0b0b0e 100%);
}

.offline::after {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  content: "";
  background: radial-gradient(ellipse at center, transparent 25%, rgba(2, 2, 3, 0.56) 100%);
}

.offline__grid {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.offline__atmosphere {
  position: absolute;
  z-index: 2;
  top: 48%;
  left: 50%;
  width: min(54rem, 82vw);
  aspect-ratio: 2 / 1;
  pointer-events: none;
  background: radial-gradient(ellipse, rgba(122, 126, 137, 0.055), transparent 68%);
  filter: blur(18px);
  transform: translate(-50%, -50%);
}

.offline__content {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hourglass {
  width: 1.38rem;
  height: auto;
  overflow: visible;
  color: rgba(211, 213, 219, 0.46);
  opacity: 0;
  animation: icon-enter 1.2s cubic-bezier(0.16, 1, 0.3, 1) 80ms forwards;
}

.hourglass__body {
  transform-box: fill-box;
  transform-origin: center;
  animation: hourglass-turn 4.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.hourglass__frame,
.hourglass__stream {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hourglass__frame {
  stroke-width: 1.15;
}

.hourglass__sand {
  fill: currentColor;
}

.hourglass__sand--top {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: sand-top 4.2s ease-in-out infinite;
}

.hourglass__sand--bottom {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: sand-bottom 4.2s ease-in-out infinite;
}

.hourglass__stream {
  stroke-width: 0.8;
  stroke-dasharray: 1.2 1.4;
  animation: sand-stream 650ms linear infinite;
}

.offline__title {
  position: relative;
  z-index: 4;
  margin: 0;
  padding: 1rem;
  color: transparent;
  background: linear-gradient(90deg, var(--text-start) 0%, var(--text-middle) 50%, var(--text-end) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: clamp(0.68rem, 0.58rem + 0.35vw, 0.92rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1.4;
  text-align: center;
  text-indent: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  animation: title-enter 1.4s cubic-bezier(0.16, 1, 0.3, 1) 180ms forwards;
}

@keyframes title-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes icon-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hourglass-turn {
  0%,
  42% {
    transform: rotate(0deg);
  }

  50%,
  92% {
    transform: rotate(180deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes sand-top {
  0%,
  5% {
    transform: scaleY(1);
    opacity: 0.9;
  }

  38%,
  50% {
    transform: scaleY(0.08);
    opacity: 0.28;
  }

  88%,
  100% {
    transform: scaleY(1);
    opacity: 0.9;
  }
}

@keyframes sand-bottom {
  0%,
  5% {
    transform: scaleY(0.12);
    opacity: 0.28;
  }

  38%,
  50% {
    transform: scaleY(1);
    opacity: 0.9;
  }

  88%,
  100% {
    transform: scaleY(0.12);
    opacity: 0.28;
  }
}

@keyframes sand-stream {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -2.6;
  }
}

@media (max-width: 47.999rem) {
  .offline__title {
    font-size: 0.76rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hourglass {
    opacity: 1;
    animation: none;
  }

  .hourglass__body,
  .hourglass__sand,
  .hourglass__stream {
    animation: none;
  }

  .offline__title {
    opacity: 1;
    animation: none;
  }
}
