/* ─── reset + typography base ───────────────────────────────── */

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  letter-spacing: -0.005em;
}

img, svg, video { display: block; max-width: 100%; }

input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  letter-spacing: inherit;
}

button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }

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

/* headings — same sans, slightly tighter */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 { font-size: var(--fs-xl); font-weight: 500; }
h2 { font-size: var(--fs-lg); font-weight: 500; }
h3 { font-size: var(--fs-md); font-weight: 500; }

.display--xl { font-size: var(--fs-2xl); line-height: 1; letter-spacing: -0.03em; }

/* utility: tabular mono numerals — for weights/reps/timers */
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: -0.02em;
}

/* utility: caption / label — the workhorse small text */
.caption {
  font-size: var(--fs-2xs);
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

.dim { color: var(--ink-3); }
.ink-2 { color: var(--ink-2); }

/* coach note — now just quieter body text */
.coach-note {
  color: var(--ink-3);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
}

/* selection */
::selection { background: var(--ink); color: var(--bg); }

/* focus ring */
:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ─── fade-in utility for view transitions ──────────────────── */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fade-in var(--dur-md) var(--ease-out-exp) both;
}

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

/* remove number input spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }
