/* aktenadler homepage hub — category + tool-card grid.
   Dark theme, cyan accent — shares the token scale used across the
   site (see css/kt.css). Self-contained: this file only styles the
   homepage at / and /de/. No external CSS/CDN. */

:root {
  color-scheme: dark light;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --bg-root: #09090b; --bg-surface: #0f0f11; --bg-raised: #18181b; --bg-overlay: #1c1c20;
  --border-subtle: #232328; --border-default: #2c2c32; --border-strong: #3f3f46;
  --text-primary: #fafaf9; --text-secondary: #a1a1aa; --text-tertiary: #8a8a93; --text-inverse: #09090b;
  --accent: #22d3ee; --accent-dim: #0891b2; --accent-wash: #22d3ee10; --accent-subtle: #22d3ee20;
  --r-sm: 4px; --r-md: 6px; --r-lg: 10px; --r-xl: 14px;
  --s-xs: 4px; --s-sm: 8px; --s-md: 12px; --s-lg: 16px; --s-xl: 24px; --s-2xl: 32px; --s-3xl: 48px;
  --ease: cubic-bezier(0.16,1,0.3,1); --fast: 120ms; --normal: 200ms;
}
@media (prefers-color-scheme: light) { :root {
  --bg-root: #f8f8fa; --bg-surface: #fff; --bg-raised: #f0f0f3; --bg-overlay: #e8e8ec;
  --border-subtle: #e2e2e8; --border-default: #d4d4db; --border-strong: #b0b0ba;
  --text-primary: #111113; --text-secondary: #5c5c66; --text-tertiary: #6b6b76; --text-inverse: #fafaf9;
  --accent: #0891b2; --accent-dim: #0e7490; --accent-wash: #0891b210; --accent-subtle: #0891b218;
}}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font: 400 15px/1.6 var(--font-sans);
  background: var(--bg-root); color: var(--text-primary);
  min-height: 100dvh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ── header ─────────────────────────────────────────────────── */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-md) var(--s-xl);
  background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle);
}
.brand {
  display: flex; align-items: center; gap: var(--s-sm);
  font: 600 13px/1 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-primary); text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 18px; height: 18px; color: var(--accent); }
.header nav { display: flex; align-items: center; gap: var(--s-lg); }
.header nav a { font-size: 13px; color: var(--text-secondary); }
.header nav a:hover { color: var(--text-primary); text-decoration: none; }
/* language switch — a small refined chip in the Linear vein:
   sans, subtle border + raised fill, restrained hover, focus ring. */
.lang-switch {
  display: inline-flex; align-items: center;
  font: 500 12px/1 var(--font-sans);
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  padding: 6px 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  transition: color var(--fast) var(--ease),
              background var(--fast) var(--ease),
              border-color var(--fast) var(--ease);
}
.lang-switch:hover {
  color: var(--text-primary);
  background: var(--bg-overlay);
  border-color: var(--border-strong);
  text-decoration: none;
}
.lang-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── hero ───────────────────────────────────────────────────── */
.hero {
  max-width: 880px; margin: 0 auto; width: 100%;
  padding: var(--s-3xl) var(--s-xl) var(--s-2xl);
  text-align: center;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 40px); font-weight: 700; line-height: 1.15;
  letter-spacing: -0.02em; margin-bottom: var(--s-lg);
}
.hero h1 .accent { color: var(--accent); }
.hero p {
  font-size: clamp(15px, 2.5vw, 18px); color: var(--text-secondary);
  max-width: 560px; margin: 0 auto;
}

/* ── main + categories ──────────────────────────────────────── */
.main { flex: 1; max-width: 880px; margin: 0 auto var(--s-3xl); padding: 0 var(--s-xl); width: 100%; }

.category { margin-bottom: var(--s-2xl); }
.category-head { margin-bottom: var(--s-lg); }
.category-head h2 {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
}
.category-head p { font-size: 13px; color: var(--text-tertiary); margin-top: var(--s-xs); }

/* ── tool-card grid ─────────────────────────────────────────── */
.tool-grid {
  display: grid; gap: var(--s-md);
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
}
.tool-card {
  display: flex; align-items: flex-start; gap: var(--s-md);
  padding: var(--s-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle); border-radius: var(--r-lg);
  text-decoration: none; color: inherit;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.tool-card:hover {
  border-color: var(--accent); background: var(--bg-raised);
  text-decoration: none; transform: translateY(-2px);
}
.tool-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tool-card .ico {
  flex-shrink: 0; width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--accent-wash); border: 1px solid var(--accent-subtle);
  border-radius: var(--r-md); color: var(--accent);
}
.tool-card .ico svg { width: 20px; height: 20px; }
.tool-card .body { min-width: 0; }
.tool-card .name { font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.tool-card .desc { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }

/* ── footer ─────────────────────────────────────────────────── */
.footer {
  padding: var(--s-xl); text-align: center;
  color: var(--text-tertiary); font-size: 12px;
  border-top: 1px solid var(--border-subtle); margin-top: auto;
}
.footer a { color: var(--text-secondary); }
.footer-links { display: flex; justify-content: center; gap: var(--s-lg); flex-wrap: wrap; margin-bottom: var(--s-sm); }

@media (max-width: 520px) {
  .header { padding: var(--s-md) var(--s-lg); }
  .header nav { gap: var(--s-md); }
  .tool-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; }
}
