/* Inkcod Legal — shared styles */

:root {
  --ink-bg: #f8f9fb;
  --ink-surface: #ffffff;
  --ink-text: #1a1d26;
  --ink-text-muted: #5c6370;
  --ink-accent: #2563eb;
  --ink-accent-hover: #1d4ed8;
  --ink-border: #e2e6ee;
  --ink-focus: #2563eb;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 48rem;
  --header-height: 4rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-text);
  background: var(--ink-bg);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

.site-header {
  background: var(--ink-surface);
  border-bottom: 1px solid var(--ink-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-text);
  text-decoration: none;
}

.brand:focus-visible {
  outline: 2px solid var(--ink-focus);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.site-nav a {
  color: var(--ink-text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--ink-text);
}

.site-nav a[aria-current="page"] {
  color: var(--ink-accent);
  border-bottom-color: var(--ink-accent);
}

.site-nav a:focus-visible {
  outline: 2px solid var(--ink-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

main.wide {
  max-width: 72rem;
}

.hero {
  margin-bottom: 2rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.hero .lead {
  margin: 0;
  font-size: 1.125rem;
  color: var(--ink-text-muted);
  max-width: 40rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  margin-top: 2rem;
}

.card {
  background: var(--ink-surface);
  border: 1px solid var(--ink-border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: #c5cad6;
  box-shadow: 0 4px 12px rgba(26, 29, 38, 0.06);
}

.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
}

.card p {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--ink-text-muted);
}

.card a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-accent);
  text-decoration: none;
}

.card a:hover {
  color: var(--ink-accent-hover);
  text-decoration: underline;
}

.card a:focus-visible {
  outline: 2px solid var(--ink-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.prose h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.prose .updated {
  margin: 0 0 2rem;
  font-size: 0.875rem;
  color: var(--ink-text-muted);
}

.prose h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
  line-height: 1.35;
}

.prose h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.0625rem;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose a {
  color: var(--ink-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: var(--ink-accent-hover);
}

.prose a:focus-visible {
  outline: 2px solid var(--ink-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.contact-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--ink-border);
}

.contact-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.contact-section h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.note-box {
  background: var(--ink-surface);
  border: 1px solid var(--ink-border);
  border-left: 4px solid var(--ink-accent);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1rem 0 1.5rem;
  font-size: 0.9375rem;
  color: var(--ink-text-muted);
}

.site-footer {
  background: var(--ink-surface);
  border-top: 1px solid var(--ink-border);
  margin-top: auto;
}

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-text-muted);
}

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

.footer-nav a {
  font-size: 0.875rem;
  color: var(--ink-text-muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--ink-text);
  text-decoration: underline;
}

.footer-nav a:focus-visible {
  outline: 2px solid var(--ink-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (max-width: 480px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .site-nav ul {
    gap: 0.5rem 1rem;
  }
}
