/* Power Duration Studio: design tokens + base styles.
   Tokens are the one place to tweak the look (PLAN.md §3a, "design tokens"). */

:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --ink: #15181c;
  --muted: #5d6570;
  --line: #e4e6e9;
  --accent: #ef2b2d;          /* SweatStack red */
  --accent-ink: #ffffff;
  --focus: #0072b2;
  --alert-bg: #fff4e5;
  --alert-ink: #7a4100;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --measure: 40rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111316;
    --surface: #181b1f;
    --ink: #e8eaed;
    --muted: #9aa3ad;
    --line: #2a2f35;
    --focus: #56b4e9;
    --alert-bg: #3a2a12;
    --alert-ink: #ffd8a8;
    color-scheme: dark;
  }
}

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

html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; width: 100%; max-width: 72rem; margin: 0 auto; padding: var(--space-5) var(--space-3); }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }

/* ── top bar ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3); border-bottom: 1px solid var(--line); background: var(--surface);
}
.brand { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 650; text-decoration: none; }
.brand-mark { width: 14px; height: 14px; border-radius: 3px; background: var(--accent); }
.topbar-user { display: flex; align-items: center; gap: var(--space-3); margin: 0; font-size: 0.9rem; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.55rem 1rem; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); border-color: var(--accent); }
.btn-quiet { padding: 0.3rem 0.7rem; font-weight: 500; }

/* ── landing ── */
.hero { max-width: var(--measure); padding: var(--space-6) 0 var(--space-5); }
.eyebrow { margin: 0 0 var(--space-2); color: var(--accent); font-weight: 650; letter-spacing: 0.02em; }
.hero h1 { margin: 0 0 var(--space-3); font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.15; letter-spacing: -0.02em; }
.lede { margin: 0 0 var(--space-4); font-size: 1.15rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }

/* ── notices (sign-in states, errors) ── */
.notice {
  max-width: 34rem; margin: var(--space-5) auto; padding: var(--space-5) var(--space-4);
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.5);
}
.notice h1 { margin: 0 0 var(--space-3); font-size: 1.5rem; letter-spacing: -0.01em; }
.notice-body p { margin: 0 0 var(--space-3); color: var(--muted); }
.notice-actions { margin-top: var(--space-4); }

.alert { padding: var(--space-3); border-radius: var(--radius); background: var(--alert-bg); color: var(--alert-ink); }

.footer { padding: var(--space-4) var(--space-3); text-align: center; font-size: 0.85rem; }
