/* Inkhound — landing site. Plain, README-flavoured, monospace-only. */

:root {
  --bg: #f6f5f0;
  --fg: #14140f;
  --fg-secondary: #3d3d38;
  --link: #0d4f8b;
  --link-visited: #5a3d8b;
  --border: #b7b5aa;
  --border-strong: #14140f;
  --code-bg: #eae8df;
  --badge-bg: #e7e3d4;
  --badge-fg: #14140f;
  --focus: #0d4f8b;
  --max-w: 80ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c0a;
    --fg: #eae8e0;
    --fg-secondary: #b9b7ae;
    --link: #7fb8ff;
    --link-visited: #c9a8ff;
    --border: #4a4942;
    --border-strong: #eae8e0;
    --code-bg: #1b1b17;
    --badge-bg: #26251f;
    --badge-fg: #eae8e0;
    --focus: #7fb8ff;
  }
}

:root[data-theme="dark"] {
  --bg: #0c0c0a;
  --fg: #eae8e0;
  --fg-secondary: #b9b7ae;
  --link: #7fb8ff;
  --link-visited: #c9a8ff;
  --border: #4a4942;
  --border-strong: #eae8e0;
  --code-bg: #1b1b17;
  --badge-bg: #26251f;
  --badge-fg: #eae8e0;
  --focus: #7fb8ff;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", "Menlo", "Consolas", monospace;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--fg);
  color: var(--bg);
  padding: 0.6em 1em;
  z-index: 100;
  border: 2px solid var(--border-strong);
}

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

/* ---------- Focus visibility ---------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- Layout shell ---------- */

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

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

header.site .wrap {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-weight: 700;
  text-decoration: none;
  color: var(--fg);
  font-size: 1.05em;
}

.brand img {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

.brand:hover,
.brand:focus-visible {
  text-decoration: underline;
}

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

nav.primary a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

nav.primary a:hover,
nav.primary a:focus-visible {
  border-bottom-color: var(--fg);
}

/* ---------- Theme toggle ---------- */

#theme-toggle {
  font: inherit;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-strong);
  padding: 0.3em 0.7em;
  cursor: pointer;
  line-height: 1;
}

#theme-toggle:hover {
  background: var(--code-bg);
}

/* ---------- Headings styled as README sections ---------- */

h1, h2, h3 {
  font-family: inherit;
  font-weight: 700;
  line-height: 1.3;
}

h1 {
  font-size: 1.6em;
  margin: 0 0 0.3em;
}

h2 {
  font-size: 1em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 2.2em 0 0.8em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--border);
}

h2:first-of-type {
  margin-top: 0;
}

h3 {
  font-size: 1em;
  text-decoration: underline;
  margin: 1.5em 0 0.6em;
}

p {
  margin: 0 0 1em;
}

.lede {
  color: var(--fg-secondary);
}

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

a:visited {
  color: var(--link-visited);
}

ul, ol {
  padding-left: 1.6em;
  margin: 0 0 1em;
}

li {
  margin-bottom: 0.4em;
}

dl {
  margin: 0 0 1em;
}

dt {
  font-weight: 700;
  margin-top: 0.8em;
}

dd {
  margin: 0.2em 0 0;
  color: var(--fg-secondary);
}

code, pre {
  font-family: inherit;
  background: var(--code-bg);
}

code {
  padding: 0.1em 0.35em;
}

pre {
  padding: 1em;
  overflow-x: auto;
  border: 1px solid var(--border);
  line-height: 1.5;
}

/* ---------- Rules (ASCII-art style via CSS, not literal dashes) ---------- */

hr,
.rule {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 2rem 0;
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.hero img {
  width: 128px;
  height: 128px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.hero-text {
  flex: 1 1 20rem;
  min-width: 0;
}

.tagline {
  font-size: 1.1em;
  margin-bottom: 1em;
}

/* ---------- Badges ---------- */

.badge {
  display: inline-block;
  background: var(--badge-bg);
  color: var(--badge-fg);
  border: 1px solid var(--border);
  padding: 0.15em 0.5em;
  font-size: 0.85em;
  margin: 0 0.4em 0.4em 0;
}

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

.btn {
  display: inline-block;
  border: 1px solid var(--border-strong);
  color: var(--fg);
  text-decoration: none;
  padding: 0.55em 1.1em;
  margin: 0 0.6em 0.6em 0;
}

.btn:hover,
.btn:focus-visible {
  background: var(--fg);
  color: var(--bg);
}

.btn:visited {
  color: var(--fg);
}

.btn.primary {
  background: var(--fg);
  color: var(--bg);
}

.btn.primary:hover,
.btn.primary:focus-visible {
  background: transparent;
  color: var(--fg);
}

.btn.primary:visited {
  color: var(--bg);
}

.cta-row {
  margin: 1.2em 0 1.6em;
}

.todo {
  font-size: 0.85em;
  color: var(--fg-secondary);
}

/* ---------- Table ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1em;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 32rem;
}

th, td {
  text-align: left;
  padding: 0.5em 0.8em 0.5em 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  white-space: nowrap;
}

/* ---------- Copy-email widget ---------- */

.copy-row {
  display: flex;
  align-items: center;
  gap: 0.6em;
  flex-wrap: wrap;
  margin: 0.6em 0 1.2em;
}

#copy-email-btn {
  font: inherit;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-strong);
  padding: 0.3em 0.7em;
  cursor: pointer;
}

#copy-email-btn:hover {
  background: var(--code-bg);
}

#copy-status {
  color: var(--fg-secondary);
  font-size: 0.9em;
}

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

footer.site {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  color: var(--fg-secondary);
  font-size: 0.9em;
}

footer.site .wrap {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

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

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

/* ---------- Impressum bilingual blocks ---------- */

.lang-block {
  margin-bottom: 2em;
}

.lang-label {
  display: inline-block;
  font-size: 0.8em;
  color: var(--fg-secondary);
  border: 1px solid var(--border);
  padding: 0.1em 0.5em;
  margin-bottom: 0.6em;
}

/* ---------- 404 ---------- */

.error-page main {
  text-align: left;
}

.error-code {
  font-size: 2.4em;
  margin: 0;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 32em) {
  .hero {
    gap: 1.2rem;
  }
  .hero img {
    width: 96px;
    height: 96px;
  }
}
