/* Static legal pages (/impressum, /privacy). They are served without the
   React bundle, so this file mirrors the site's tokens from src/index.css
   and the fonts from src/main.tsx (copied into /fonts, all self-hosted). */
@font-face {
  font-family: "Bricolage Grotesque Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/bricolage-grotesque-latin-opsz-normal.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/public-sans-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/fonts/public-sans-latin-600-normal.woff2) format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2");
}

:root {
  color-scheme: light dark;
  --background: 48 24% 98%;
  --foreground: 222 22% 16%;
  --card: 0 0% 100%;
  --primary: 224 62% 42%;
  --muted-foreground: 222 10% 42%;
  --accent: 16 80% 50%;
  --border: 222 16% 85%;
  --input: 222 16% 82%;
  --ring: 224 62% 42%;
  --grid: 224 40% 40%;
  --grid-alpha: 0.06;
  --grid-alpha-major: 0.09;
  --shadow-card: 0 2px 0 0 hsl(222 22% 16% / 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: 222 16% 10%;
    --foreground: 45 18% 90%;
    --card: 222 15% 13%;
    --primary: 222 85% 72%;
    --muted-foreground: 222 8% 62%;
    --accent: 16 88% 62%;
    --border: 222 10% 25%;
    --input: 222 10% 28%;
    --ring: 222 85% 72%;
    --grid: 222 40% 70%;
    --grid-alpha: 0.05;
    --grid-alpha-major: 0.08;
    --shadow-card: 0 2px 0 0 hsl(0 0% 0% / 0.4);
  }
}

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

html {
  background: hsl(var(--background));
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  color: hsl(var(--foreground));
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: hsl(var(--background));
  /* Graph paper, same as the home page */
  background-image:
    linear-gradient(to right, hsl(var(--grid) / var(--grid-alpha-major)) 1px, transparent 1px),
    linear-gradient(to bottom, hsl(var(--grid) / var(--grid-alpha-major)) 1px, transparent 1px),
    linear-gradient(to right, hsl(var(--grid) / var(--grid-alpha)) 1px, transparent 1px),
    linear-gradient(to bottom, hsl(var(--grid) / var(--grid-alpha)) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}
::selection { background: hsl(var(--accent) / 0.25); }

/* Header: the home page's nav bar, brand only */
.site-head__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 4rem;
  display: flex;
  align-items: center;
}
.brand {
  font-family: "Bricolage Grotesque Variable", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5rem;
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: color 0.2s;
}
.brand:hover { color: hsl(var(--primary)); }

/* Content column: the project pages' container-tight */
.legal {
  max-width: 48rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 6rem;
}
.back-wrap { margin: 0 0 2.5rem; font-size: 0.875rem; line-height: 1.25rem; }
.back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 0.2s;
}
.back:hover { color: hsl(var(--foreground)); }
.back svg { width: 0.875rem; height: 0.875rem; flex: none; }

h1, h2 {
  font-family: "Bricolage Grotesque Variable", sans-serif;
  color: hsl(var(--foreground));
}
h1 {
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  line-height: 1.08;
}
h2 {
  margin: 3rem 0 0.75rem;
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.3;
}
p {
  margin: 0 0 1.25rem;
  font-size: 1.125rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}
/* Small mono line under the title, like the stack line on project pages */
.meta {
  margin: 0 0 3.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
}
.meta + h2 { margin-top: 0; }

/* Inline links: the site's ink-link */
.legal a:not(.back) {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.legal a:not(.back):hover {
  text-decoration-style: wavy;
  text-decoration-color: hsl(var(--accent));
}
a:focus-visible, button:focus-visible {
  outline: none;
  border-radius: 2px;
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}

/* Contact form card: the site's hand-drawn sketch box */
.sketch {
  margin-top: 3.5rem;
  padding: 2rem 1.5rem;
  border: 1.5px solid hsl(var(--foreground) / 0.75);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  background: hsl(var(--card));
  box-shadow: var(--shadow-card);
}
.sketch h2 { margin-top: 0; }
.sketch .lede { color: hsl(var(--muted-foreground)); font-size: 1rem; line-height: 1.65; }
/* Honeypot: off-screen for people, still submitted with the form */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.sketch form { margin-top: 1.75rem; }
.field { margin: 0 0 1.25rem; }
.field label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
}
.field input, .field textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5rem;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input { height: 2.75rem; }
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--card)), 0 0 0 4px hsl(var(--ring));
}
/* Primary button: the site's "hero" button with the hand-drawn radius */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  margin-top: 0.25rem;
  padding: 0.75rem 2rem;
  font-family: "Bricolage Grotesque Variable", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: hsl(var(--background));
  background: hsl(var(--foreground));
  border: 0;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  cursor: pointer;
  transition: background-color 0.2s, transform 120ms cubic-bezier(0.2, 0, 0, 1);
}
.btn:hover { background: hsl(var(--foreground) / 0.9); }
.btn:active { transform: scale(0.96); }
.btn:focus-visible {
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  box-shadow: 0 0 0 2px hsl(var(--card)), 0 0 0 4px hsl(var(--ring));
}
@media (min-width: 640px) {
  .site-head__inner { padding: 0 2rem; }
  .brand { font-size: 1.125rem; line-height: 1.75rem; }
  .legal { padding: 4rem 2rem 7rem; }
  .sketch { padding: 2.5rem 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
