:root {
  --top: #dff6ff;
  --middle: #91d0f4;
  --bottom: #3d92ce;
  --text: #f8fbff;
  --muted: rgba(248, 251, 255, 0.68);
  --panel: rgba(7, 12, 36, 0.22);
  --line: rgba(255, 255, 255, 0.22);
  --weather-tint: rgba(255, 255, 255, 0);
  --weather-opacity: 0;
  --grain-opacity: 0.03;
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: #080b22;
  overflow-x: hidden;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: clamp(22px, 5vw, 72px);
  color: var(--text);
  background:
    linear-gradient(135deg, var(--top), var(--middle), var(--bottom), var(--middle));
  background-size: 240% 240%;
  animation: gradient-flow 24s ease-in-out infinite;
  isolation: isolate;
  transition: color 900ms ease;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background:
    linear-gradient(120deg, var(--weather-tint), transparent 64%),
    radial-gradient(circle at var(--glow-x, 18%) var(--glow-y, 20%), rgba(255, 255, 255, var(--glow-opacity, 0.28)), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.28));
  opacity: 0.92;
  pointer-events: none;
  transition: background 900ms ease;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background-image:
    radial-gradient(circle at 22% 24%, rgba(255, 255, 255, var(--grain-opacity)), transparent 24%),
    radial-gradient(circle at 78% 76%, rgba(3, 12, 26, var(--grain-opacity)), transparent 28%);
  background-size: 100% 100%;
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
  opacity: var(--weather-opacity);
  pointer-events: none;
}

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

.content {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 820px);
  gap: clamp(16px, 3vw, 26px);
  justify-items: center;
  text-align: center;
}

h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(3.6rem, 14vw, 9.5rem);
  line-height: 0.86;
  font-weight: 900;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 700;
}

.counter {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(22px);
}

.counter {
  display: grid;
  width: min(100%, 760px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: clamp(6px, 1.5vw, 12px);
  padding: clamp(10px, 2vw, 14px);
}

.counter-unit {
  display: grid;
  min-width: 0;
  min-height: clamp(88px, 14vw, 134px);
  place-items: center;
  padding: clamp(10px, 2vw, 16px);
}

.counter-unit strong {
  font-size: clamp(2.7rem, 8vw, 5.8rem);
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.counter-unit span {
  color: var(--muted);
  font-size: clamp(0.68rem, 1.8vw, 0.82rem);
  font-weight: 800;
  text-transform: uppercase;
}

@keyframes gradient-flow {
  0%,
  100% {
    background-position: 0% 48%;
  }

  50% {
    background-position: 100% 52%;
  }
}

@media (max-width: 680px) {
  .hero {
    min-height: 100dvh;
    padding: 22px;
  }

  h1 {
    font-size: clamp(3.2rem, 20vw, 5.3rem);
  }

  .counter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .counter-unit {
    min-height: 92px;
    padding: 10px 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
