/* ========================================
 * base.css - reset, typography, layout
 * ======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: 2.25rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.25; }
h3 { font-size: 1.125rem; font-weight: 600; }

p { margin-bottom: 1rem; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--font-mono);
  background: var(--muted);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.875em;
}

img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  min-width: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main { flex: 1; min-width: 0; }
.public-main { padding: 3rem 1.5rem 4rem; }
.app-main { padding: 2rem 1.5rem 3rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.25rem; }
  .public-main { padding: 2rem 1rem 3rem; }
  .app-main { padding: 1.5rem 1rem 2.5rem; }
}

/* --- Header --- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 92%, transparent);
}
.site-header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 0.875rem; padding-bottom: 0.875rem;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--foreground); font-weight: 700; font-size: 1.0625rem;
  letter-spacing: -0.01em;
}
.wordmark:hover { text-decoration: none; }
.wordmark-glyph { width: 22px; height: 22px; }
.site-nav { display: flex; align-items: center; gap: 1rem; }
.site-nav a:not(.btn) { color: var(--text-secondary); font-size: 0.9375rem; }
.site-nav a:not(.btn):hover { color: var(--foreground); }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--border); margin-top: auto; }
.site-footer-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem;
  padding-top: 1.25rem; padding-bottom: 1.25rem;
  color: var(--muted-foreground); font-size: 0.875rem;
}
.site-footer-row p { margin: 0; }
.site-footer-row nav { display: flex; align-items: center; gap: 1rem; }
.site-footer-row a { color: var(--muted-foreground); }
.site-footer-row a:hover { color: var(--foreground); }

/* --- Utilities --- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.text-muted { color: var(--muted-foreground); }
.text-sm { font-size: 0.875rem; }
.footnote { color: var(--muted-foreground); font-size: 0.8125rem; margin-top: 0.75rem; }

/* --- 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;
  }
}
