/*
  Pocket Rocket site styles.

  Layout: tokens, then base elements, then one block per component.
  Each component block only styles its own class names, so a component's
  markup and its block can be moved together without touching the rest.
*/

/* Tokens */

:root {
  color-scheme: light dark;

  --color-bg: #ffffff;
  --color-surface: #f5f5f7;
  --color-text: #1d1d1f;
  --color-text-muted: #5e5e66;
  --color-border: #e2e2e7;
  --color-accent: #2f5bd3;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;

  --radius: 12px;
  --content-width: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #111113;
    --color-surface: #1c1c1f;
    --color-text: #f2f2f4;
    --color-text-muted: #a1a1aa;
    --color-border: #2c2c31;
    --color-accent: #7fa2ff;
  }
}

/* Base */

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 var(--space-3);
}

h1 {
  font-size: clamp(1.75rem, 4vw + 1rem, 2.5rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.25rem;
}

h3 {
  font-size: 1.125rem;
}

p {
  margin: 0 0 var(--space-3);
}

a {
  color: var(--color-accent);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Component: page container */

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* Component: site header */

.site-header {
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
}

.site-header__name {
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}

/* Component: section */

.section {
  padding: var(--space-5) 0;
}

.section + .section {
  border-top: 1px solid var(--color-border);
}

.section__lead {
  color: var(--color-text-muted);
  font-size: 1.125rem;
  max-width: 36rem;
}

/* Component: app card */

.app-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
}

.app-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
}

.app-card__name {
  margin: 0;
}

.app-card__status {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.app-card__description {
  margin: 0;
}

/* Component: document (long-form text such as the privacy page) */

.document h2 {
  margin-top: var(--space-4);
}

.document__updated {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

/* Component: site footer */

.site-footer {
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  padding: var(--space-4) 0 var(--space-5);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}

.site-footer__links {
  display: flex;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer p {
  margin: 0;
}
