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

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

body {
  margin: 0;
  color: #171717;
  background-image: url("assets/3d777-bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #fff;
  opacity: 0.3;
}

button {
  font: inherit;
}

.page-shell {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  overflow: hidden;
}

.hero-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

.hero-image {
  width: 600px;
  min-width: 28rem;
  height: auto;
  display: block;
}

.content-wrap {
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 24px;
}

.title {
  margin: 0;
  color: #2563eb;
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  text-align: center;
}

.link-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 0 auto;
}

.link-card {
  position: relative;
  display: flex;
  justify-content: space-between;
  overflow-x: hidden;
  padding: 2px 8px;
  color: #fff;
  text-align: center;
  background-color: #1f2937;
  background-image: url("assets/3d777-bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 4px solid #3b82f6;
  border-radius: 8px;
  box-shadow:
    0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.link-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle,
    transparent,
    rgba(124, 184, 255, 0.2),
    rgba(124, 184, 255, 0.4),
    rgba(124, 184, 255, 0.9)
  );
}

.card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.number-badge {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: #3f3f46;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.speed-pane {
  width: 40%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.progress-track {
  width: 100%;
  height: 4px;
  margin-top: 16px;
  overflow: hidden;
  background: #374151;
  border-radius: 9999px;
}

.progress-fill {
  height: 100%;
  width: 0;
  transition: width 500ms;
}

.progress-fill span {
  opacity: 0;
}

.progress-fill.green {
  background: #22c55e;
}

.progress-fill.blue {
  background: #3b82f6;
}

.progress-fill.yellow {
  background: #eab308;
}

.progress-fill.orange {
  background: #f97316;
}

.progress-fill.red {
  background: #ef4444;
}

.progress-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}

.link-label,
.latency {
  margin: 0;
  color: #52525b;
  font-size: 10px;
  font-weight: 400;
}

.status-pill {
  margin: 0;
  padding: 0 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-style: italic;
  font-weight: 700;
}

.status-bg-green {
  background: rgb(34 197 94 / 0.25);
}

.status-bg-blue {
  background: rgb(59 130 246 / 0.25);
}

.status-bg-yellow {
  background: rgb(234 179 8 / 0.25);
}

.status-bg-orange {
  background: rgb(249 115 22 / 0.25);
}

.status-text-green {
  color: #15803d;
}

.status-text-blue {
  color: #1d4ed8;
}

.status-text-yellow {
  color: #a16207;
}

.status-text-orange {
  color: #c2410c;
}

.latency {
  font-weight: 700;
}

.latency-value {
  font-size: 12px;
  font-weight: 800;
}

.go-button {
  position: relative;
  height: 40%;
  padding: 0 16px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  background: #3b82f6;
  border: 2px solid #fff;
  border-radius: 9999px;
  cursor: pointer;
  transition: transform 300ms ease-in-out;
}

.go-button.orange {
  background: #fb923c;
}

.go-button.blue {
  background: #3b82f6;
}

.go-button.gray {
  background: #71717a;
  border-color: #27272a;
}

.go-button:hover,
.speed-button:hover,
.service-button:hover {
  transform: scale(1.1);
}

.go-button:active,
.speed-button:active,
.service-button:active {
  transform: scale(1);
}

.fire-icon {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 24px;
  height: 24px;
  animation: fire 1.5s infinite;
}

.speed-button {
  width: 260px;
  height: 50px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  background-color: transparent;
  background-image: url("assets/speed-test-button.webp");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  border: 0;
  cursor: pointer;
  transition: transform 300ms ease-in-out;
}

.speed-button span {
  position: relative;
  top: -3px;
}

.service-button {
  position: fixed;
  right: 8px;
  bottom: 8px;
  width: 50px;
  height: 50px;
  background-color: transparent;
  background-image: url("assets/customer-service.webp");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  border: 0;
  cursor: pointer;
  transition: transform 300ms ease-in-out;
}

@keyframes fire {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(0.8);
    opacity: 0.8;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    color: #ededed;
    background-color: #0a0a0a;
  }
}

@media (min-width: 640px) {
  .content-wrap {
    padding: 0 32px;
  }

  .status-pill {
    font-size: 12px;
  }
}

@media (min-width: 768px) {
  .hero-image {
    width: 80%;
  }

  .title {
    font-size: 24px;
    line-height: 32px;
  }

  .number-badge {
    width: 48px;
    height: 48px;
    font-size: 24px;
    line-height: 32px;
  }

  .progress-track {
    height: 8px;
  }

  .progress-labels {
    padding: 0 16px;
  }

  .link-label {
    font-size: 18px;
    line-height: 28px;
  }

  .latency-value {
    font-size: 24px;
    line-height: 32px;
  }

  .go-button {
    height: 60%;
    padding: 8px 32px;
    font-size: 12px;
  }

  .fire-icon {
    top: -8px;
    right: -8px;
  }

  .speed-button {
    width: 300px;
    height: 90px;
    font-size: 18px;
  }

  .speed-button span {
    top: -5px;
  }

  .service-button {
    right: 32px;
    bottom: 32px;
    width: 80px;
    height: 80px;
  }
}

@media (min-width: 1024px) {
  .hero-image {
    width: 65%;
  }

  .content-wrap {
    padding: 0 200px;
  }

  .title {
    font-size: 36px;
    line-height: 40px;
  }

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

  .number-badge {
    width: 60px;
    height: 60px;
  }

  .status-pill {
    padding: 0 16px;
    font-size: 15px;
  }

  .go-button {
    font-size: 12px;
  }

  .service-button {
    width: 100px;
    height: 100px;
  }
}

@media (min-width: 1536px) {
  .content-wrap {
    padding: 0 400px;
  }
}
