:root {
  color-scheme: dark;
  --bg: #08090f;
  --surface: rgba(19, 21, 31, 0.72);
  --surface-strong: #11131c;
  --line: rgba(255, 255, 255, 0.1);
  --muted: #8f92a5;
  --text: #f5f3ef;
  --lime: #d8ff63;
  --violet: #a68cff;
  --cyan: #62ddff;
  --ring-size: 180px;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 64px 64px;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background:
    radial-gradient(circle at 50% -20%, rgba(119, 93, 255, 0.18), transparent 46%),
    linear-gradient(180deg, transparent 55%, rgba(8, 9, 15, 0.86));
  pointer-events: none;
}

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

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0 24px;
}

.topbar,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar {
  animation: appear 0.7s ease-out both;
}

.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.brand__mark {
  position: relative;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(216, 255, 99, 0.55);
  border-radius: 50%;
  box-shadow: inset 0 0 14px rgba(216, 255, 99, 0.14);
}

.brand__mark::before,
.brand__mark::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  background: var(--lime);
  transform-origin: 0 50%;
}

.brand__mark::before {
  width: 7px;
  height: 1px;
  transform: rotate(-48deg);
}

.brand__mark::after {
  width: 5px;
  height: 1px;
  transform: rotate(42deg);
}

.live-pill {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 8px 12px;
  color: #c9cbd5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.live-pill__dot {
  width: 6px;
  height: 6px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(216, 255, 99, 0.9);
  animation: pulse 1.8s ease-in-out infinite;
}

.hero {
  position: relative;
  padding: 76px 0 64px;
  text-align: center;
}

.hero::after {
  position: absolute;
  top: 35px;
  left: 50%;
  z-index: -1;
  width: min(720px, 80vw);
  aspect-ratio: 1;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: breathe 5s ease-in-out infinite;
}

.hero__eyebrow {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: var(--lime);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.2em;
  animation: rise 0.65s 0.05s ease-out both;
}

.hero__eyebrow-line {
  width: 34px;
  height: 1px;
  background: rgba(216, 255, 99, 0.45);
}

h1 {
  margin: 24px 0 12px;
  font-size: clamp(54px, 8.1vw, 108px);
  font-weight: 440;
  line-height: 0.82;
  letter-spacing: -0.075em;
  animation: rise 0.75s 0.1s ease-out both;
}

h1 span {
  color: transparent;
  font-style: italic;
  font-weight: 520;
  -webkit-text-stroke: 1px rgba(245, 243, 239, 0.78);
}

.hero__date {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  animation: rise 0.75s 0.16s ease-out both;
}

.hero__date span {
  color: rgba(216, 255, 99, 0.65);
}

.total-counter {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: clamp(7px, 1.5vw, 24px);
  align-items: start;
  width: min(770px, 100%);
  margin: 52px auto 0;
  animation: rise 0.8s 0.24s ease-out both;
}

.time-block {
  min-width: 0;
}

.time-block__value {
  display: block;
  min-width: 1.6em;
  font-variant-numeric: tabular-nums;
  font-size: clamp(42px, 7vw, 78px);
  font-weight: 330;
  line-height: 1;
  letter-spacing: -0.055em;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.08);
}

.time-block__label {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.total-counter__separator {
  color: rgba(255, 255, 255, 0.22);
  font-size: clamp(35px, 6vw, 68px);
  font-weight: 200;
  line-height: 0.9;
  animation: colon 1s steps(1) infinite;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  background: rgba(15, 17, 25, 0.62);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.26),
    inset 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(22px);
  animation: rise 0.9s 0.32s ease-out both;
}

.metric-card {
  position: relative;
  min-width: 0;
  padding: 22px 26px 24px;
}

.metric-card + .metric-card {
  border-left: 1px solid var(--line);
}

.metric-card::before {
  position: absolute;
  inset: auto 12% 0;
  height: 1px;
  content: "";
  opacity: 0.8;
}

.metric-card--days::before {
  background: linear-gradient(90deg, transparent, var(--violet), transparent);
}

.metric-card--hours::before {
  background: linear-gradient(90deg, transparent, #ff89cb, transparent);
}

.metric-card--minutes::before {
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.metric-card--seconds::before {
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
}

.metric-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-card__index {
  color: #5f6271;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.metric-card__name {
  color: #b6b7c1;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.18em;
}

.ring {
  position: relative;
  width: var(--ring-size);
  height: var(--ring-size);
  margin: 18px auto 7px;
}

.ring svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: 5;
}

.ring__track {
  stroke: rgba(255, 255, 255, 0.075);
}

.ring__progress {
  stroke-linecap: round;
  stroke-dasharray: 471.239;
  stroke-dashoffset: 471.239;
  filter: drop-shadow(0 0 8px currentColor);
  transition: stroke-dashoffset 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.metric-card--days .ring__progress {
  color: var(--violet);
  stroke: currentColor;
}

.metric-card--hours .ring__progress {
  color: #ff89cb;
  stroke: currentColor;
}

.metric-card--minutes .ring__progress {
  color: var(--cyan);
  stroke: currentColor;
}

.metric-card--seconds .ring__progress {
  color: var(--lime);
  stroke: currentColor;
  animation: ring-blink 1s steps(1, end) infinite;
}

.ring::after {
  position: absolute;
  inset: 20px;
  z-index: -1;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 50%;
}

.ring__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ring__value {
  font-variant-numeric: tabular-nums;
  font-size: 42px;
  font-weight: 410;
  line-height: 1;
  letter-spacing: -0.05em;
}

.ring__value--decimal {
  font-size: 34px;
}

.ring__value--total {
  font-size: 30px;
}

.ring__value--seconds {
  font-size: 25px;
}

.ring__unit {
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.metric-card__note {
  margin: 0;
  color: #686b7c;
  font-size: 10px;
  text-align: center;
}

.footer {
  padding-top: 20px;
  color: #626575;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.footer p {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.footer__signal {
  width: 5px;
  height: 5px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(216, 255, 99, 0.7);
}

.ambient {
  position: fixed;
  z-index: -2;
  width: 380px;
  height: 380px;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.1;
}

.ambient--one {
  top: 28%;
  left: -190px;
  background: var(--violet);
  animation: drift-one 12s ease-in-out infinite alternate;
}

.ambient--two {
  right: -210px;
  bottom: 2%;
  background: var(--cyan);
  animation: drift-two 14s ease-in-out infinite alternate;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.finished {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  background: rgba(8, 9, 15, 0.78);
  opacity: 0;
  backdrop-filter: blur(24px);
  transition:
    opacity 0.8s ease,
    visibility 0.8s;
}

.finished.is-visible {
  visibility: visible;
  opacity: 1;
}

.finished__panel {
  width: min(560px, 100%);
  padding: 64px 28px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0, rgba(216, 255, 99, 0.11), transparent 55%),
    var(--surface-strong);
  border: 1px solid rgba(216, 255, 99, 0.22);
  border-radius: 28px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
}

.finished__eyebrow {
  color: var(--lime);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.finished h2 {
  margin: 20px 0 12px;
  font-size: clamp(46px, 9vw, 78px);
  font-weight: 420;
  line-height: 1;
  letter-spacing: -0.06em;
}

.finished p {
  margin: 0;
  color: var(--muted);
}

@keyframes appear {
  from {
    opacity: 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes pulse {
  50% {
    opacity: 0.45;
    transform: scale(0.76);
  }
}

@keyframes ring-blink {
  50% {
    opacity: 0.3;
    filter: drop-shadow(0 0 2px currentColor);
  }
}

@keyframes colon {
  50% {
    opacity: 0.25;
  }
}

@keyframes breathe {
  50% {
    opacity: 0.65;
    transform: translate(-50%, -50%) scale(1.025);
  }
}

@keyframes drift-one {
  to {
    transform: translate(80px, -40px);
  }
}

@keyframes drift-two {
  to {
    transform: translate(-80px, -50px);
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 28px, 560px);
    padding-top: 20px;
  }

  .hero {
    padding: 62px 0 52px;
  }

  h1 {
    font-size: clamp(52px, 18vw, 82px);
  }

  .total-counter {
    gap: 4px;
    margin-top: 42px;
  }

  .time-block__value {
    font-size: clamp(34px, 11vw, 58px);
  }

  .time-block__label {
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .total-counter__separator {
    font-size: clamp(28px, 9vw, 50px);
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .metric-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--ring-size);
    grid-template-rows: auto 1fr;
    min-height: 230px;
    padding: 22px 24px;
  }

  .metric-card + .metric-card {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .metric-card__header {
    grid-column: 1 / -1;
  }

  .ring {
    grid-column: 2;
    grid-row: 2 / span 2;
    margin: 6px 0 0;
  }

  .metric-card__note {
    align-self: center;
    max-width: 110px;
    margin: 0 auto;
    line-height: 1.5;
  }
}

@media (min-width: 761px) and (max-width: 1060px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-card:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .metric-card:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 460px) {
  :root {
    --ring-size: 150px;
  }

  .live-pill {
    padding: 7px 9px;
  }

  .live-pill span:last-child {
    display: none;
  }

  .hero {
    padding-top: 54px;
  }

  .hero__date {
    flex-wrap: wrap;
    font-size: 11px;
  }

  .metric-card {
    min-height: 200px;
  }

  .ring__value {
    font-size: 37px;
  }

  .ring__value--decimal {
    font-size: 29px;
  }

  .footer p:first-child {
    max-width: 185px;
    line-height: 1.5;
  }
}

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