/* JEVMETER design tokens
   reference: faith.xyz / saturnpad.app - huge negative space, muted warm neutral,
   restrained type, nothing decorative, let the gauge breathe.
   palette:  bg #EDE7DA (warm muted cream)  dial #FAF6ED (gauge face)
             ink #4B4E52 (charcoal, matches the approved avatar linework)
             red #D65C4A (the red zone)
   type:     Jost, one family, three weights, generously spaced
   spacing:  8px base scale (8/16/24/40/64/96)
   radius:   999px pills only (buy button); everything else is a hairline or a circle
   motion:   one idiom, a single cubic-bezier ease on the needle transform */

:root {
  --bg: #EDE7DA;
  --dial: #FAF6ED;
  --ink: #4B4E52;
  --ink-soft: rgba(75, 78, 82, 0.62);
  --red: #D65C4A;
  --line: rgba(75, 78, 82, 0.16);
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
}

* { box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Jost', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

button {
  font-family: inherit;
  color: inherit;
}

/* ---------- topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
}

.wordmark {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--ink);
}

.x-link {
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: color 200ms ease;
}

.x-link:hover,
.x-link:focus-visible {
  color: var(--ink);
}

/* ---------- hero ---------- */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3) var(--space-5);
  text-align: center;
}

.gauge-button {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0 0 var(--space-2);
  width: min(340px, 62vw);
  aspect-ratio: 1 / 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.gauge-button:focus-visible {
  outline: 2px solid var(--ink-soft);
  outline-offset: 10px;
  border-radius: 50%;
}

.gauge-button svg {
  display: block;
  overflow: visible;
}

.red-zone {
  fill: var(--red);
}

.needle-group {
  transform-origin: 200px 200px;
  transition: transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
}

.gauge-label {
  margin: var(--space-1) 0 0;
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.counter {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.counter #reading-count {
  font-weight: 500;
  color: var(--ink);
}

.tagline {
  margin: var(--space-2) 0 0;
  font-size: clamp(14px, 1.6vw, 16px);
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 30ch;
}

.ca-row {
  margin-top: var(--space-4);
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.ca-label {
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
}

.ca-value {
  color: var(--ink);
  font-family: 'Jost', monospace;
  letter-spacing: 0.02em;
}

.buy-btn {
  margin-top: var(--space-3);
  display: inline-block;
  padding: 12px 28px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.1em;
  transition: background 200ms ease, color 200ms ease;
}

.buy-btn:hover,
.buy-btn:focus-visible {
  background: var(--ink);
  color: var(--dial);
}

/* ---------- footbar ---------- */

.footbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4) var(--space-3);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.canary {
  font-variant-numeric: tabular-nums;
}

/* ---------- responsive ---------- */

@media (max-width: 480px) {
  .topbar { padding: var(--space-2) var(--space-3); }
  .hero { padding: var(--space-3) var(--space-2) var(--space-4); gap: var(--space-1); }
  .gauge-button { width: min(280px, 78vw); }
  .ca-row { margin-top: var(--space-3); flex-direction: column; gap: 2px; }
  .footbar { padding: var(--space-1) var(--space-3) var(--space-2); flex-direction: column; gap: 6px; text-align: center; }
}

@media (min-width: 1200px) {
  .gauge-button { width: 380px; }
  .tagline { max-width: 34ch; }
}

@media (prefers-reduced-motion: reduce) {
  .needle-group { transition: none; }
  .buy-btn, .x-link { transition: none; }
}
