/* cattracks.app — shared base styles (tokens, reset, nav, type, footer).
   "Night instrument" identity — see .superpowers/sdd/cattracks-design-tokens.md.
   This site can't import the extension's CSS (separate tree); the palette is
   replicated here as custom props so site + extension read as one product. */

:root {
  color-scheme: dark;

  --ink: #0e1218;    /* base — blue-black instrument panel, never pure black */
  --panel: #161c26;  /* raised surface: cards, header */
  --panel-2: #1b2330; /* slightly lifted panel, for hover states */
  --line: #263140;   /* hairline dividers, borders */
  --fg: #c9d4e3;      /* primary text — soft blue-white, never #fff */
  --muted: #6b7a8f;   /* timestamps, urls, secondary copy */
  --signal: #4fd1c5;  /* "now" / active / recording — cool, bright */
  --ember: #e0a458;   /* the one warm accent — reaching into the past */
  --danger: #e06a5a;  /* destructive only (deleting history) — not used here */

  --font-ui: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", monospace;

  --content-w: 46rem;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--signal);
  text-decoration-color: color-mix(in srgb, var(--signal) 45%, transparent);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: var(--signal);
}

/* Visible keyboard focus everywhere, in the signal color — quality floor. */
:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  z-index: 100;
  background: var(--panel);
  color: var(--fg);
  padding: 0.75em 1.25em;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ---------------------------------------------------------------------- */
/* Header                                                                  */
/* ---------------------------------------------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}

.wordmark {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
}

.wordmark:hover {
  color: var(--fg);
  text-decoration: none;
}

.site-header nav a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.4em 0.2em;
}

.site-header nav a:hover {
  color: var(--fg);
}

/* ---------------------------------------------------------------------- */
/* Shared type rhythm                                                      */
/* ---------------------------------------------------------------------- */

main {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
}

p {
  color: var(--fg);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

code {
  font-family: var(--font-mono);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
  color: var(--fg);
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.75em 1.4em;
  border: 1px solid transparent;
  cursor: pointer;
}

/* The one warm accent, reserved for the primary "reach into this" action —
   mirrors the extension's sole ember button ("Restore this moment"). */
.btn-ember {
  background: var(--ember);
  color: #14100a;
}

.btn-ember:hover {
  background: color-mix(in srgb, var(--ember) 88%, white 12%);
  text-decoration: none;
}

.btn-quiet {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}

.btn-quiet:hover {
  background: var(--panel);
  text-decoration: none;
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--fg);
}

.site-footer ul {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

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