:root {
  --bg-primary: #0a0a0c;
  --bg-card: #121216;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.22);
  --text-primary: #f4f4f6;
  --text-secondary: #9ba1b0;
  --text-muted: #626775;
  --tg-blue: #2481cc;
  --tg-blue-hover: #1c68a6;
  --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  width: 100%;
}

.page-wrapper {
  max-width: min(92vw, 36.25rem);
  width: 100%;
  padding: clamp(1.5rem, 5dvh, 2.75rem) clamp(1rem, 4vw, 1.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: auto;
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.logo-wrapper {
  margin-bottom: clamp(1.25rem, 4vw, 1.75rem);
}

.hero-logo {
  width: clamp(7.5rem, 28vw, 9.5rem);
  height: clamp(7.5rem, 28vw, 9.5rem);
  border-radius: clamp(1.5rem, 5.5vw, 2rem);
  box-shadow: 0 0 clamp(1.5rem, 5vw, 3rem) rgba(255, 255, 255, 0.1);
  object-fit: contain;
}

h1 {
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: clamp(0.65rem, 2vw, 0.9rem);
}

.subtitle {
  font-size: clamp(0.9rem, 2.4vw, 1.1rem);
  color: var(--text-secondary);
  max-width: min(100%, 30rem);
  margin: 0 auto clamp(1.5rem, 4.5vw, 2.25rem);
  line-height: 1.55;
  text-wrap: balance;
}

/* CTA Group */
.cta-group {
  display: flex;
  gap: clamp(0.75rem, 2.5vw, 1rem);
  justify-content: center;
  align-items: stretch;
  width: 100%;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: clamp(0.75rem, 2vw, 0.9rem) clamp(1.25rem, 3.5vw, 1.75rem);
  border-radius: 0.625rem;
  font-size: clamp(0.875rem, 2vw, 0.95rem);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  min-height: 3rem;
  cursor: pointer;
  flex: 1 1 auto;
  max-width: 100%;
}

.btn svg {
  width: clamp(1.125rem, 2.5vw, 1.25rem);
  height: clamp(1.125rem, 2.5vw, 1.25rem);
  flex-shrink: 0;
}

.btn-primary {
  background-color: var(--tg-blue);
  color: #ffffff;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background-color: var(--tg-blue-hover);
  transform: translateY(-0.125rem);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background-color: #1a1a22;
  transform: translateY(-0.125rem);
}

.btn-kofi {
  background-color: #ff5e5b;
  color: #ffffff;
  border: 1px solid transparent;
}

.btn-kofi:hover {
  background-color: #e04b48;
  transform: translateY(-0.125rem);
}

/* Live Telemetry Card */
.telemetry-card {
  width: 100%;
  margin-top: clamp(1.75rem, 5vw, 2.25rem);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.875rem;
  padding: clamp(1rem, 3vw, 1.25rem);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease;
}

.telemetry-card:hover {
  border-color: var(--border-hover);
}

.telemetry-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.pulse-indicator {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-glow 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 12px #10b981; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.telemetry-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.telemetry-badge {
  margin-left: auto;
  font-size: 0.725rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 2rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
  white-space: nowrap;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.25rem;
  min-width: 0;
}

.telemetry-value {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 700;
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: -0.02em;
}

.telemetry-label {
  font-size: clamp(0.65rem, 1.8vw, 0.725rem);
  color: var(--text-muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Footer */
footer {
  margin-top: clamp(2rem, 6dvh, 3.25rem);
  color: var(--text-muted);
  font-size: clamp(0.75rem, 1.8vw, 0.825rem);
  width: 100%;
}

footer a {
  color: var(--tg-blue);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s, text-decoration 0.2s;
}

footer a:hover {
  color: var(--tg-blue-hover);
  text-decoration: underline;
}

/* Mobile & Small Screen Rules */
@media (max-width: 32.5em) {
  .cta-group {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    flex: 1 1 100%;
  }

  .telemetry-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .telemetry-title {
    font-size: 0.7rem;
  }

  .telemetry-badge {
    font-size: 0.65rem;
  }
}
