/* darkfield.ch — Stylesheet, dunkles Research-Theme */

:root {
  --bg: #080b10;
  --bg-soft: #11161f;
  --bg-elev: #161d28;
  --bg-card: #1a212d;
  --border: #2a3444;
  --border-soft: #34405a;
  --fg: #f1f5f9;            /* near-white, 17:1 on bg */
  --fg-muted: #c3cddb;       /* WCAG AA on bg + all bg-tones, 10:1 on bg */
  --fg-dim: #8a99b0;         /* captions only, still >= 5:1 on bg */
  --accent: #7ce8fa;          /* brighter cyan for contrast */
  --accent-soft: #155e75;
  --accent-strong: #2cd4ee;
  --warn: #fbbf24;
  --ok: #34d399;
  --mono: "Consolas", "Menlo", "Roboto Mono", monospace;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Inline text links are underlined by default -- colour alone is not
 * a sufficient indicator (WCAG 1.4.1). Navigation, buttons, footer
 * rows and the language switcher opt out via more specific rules
 * below. */
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; color: var(--accent-strong); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

strong { color: var(--fg); font-weight: 600; }
em { color: var(--fg-muted); font-style: normal; }

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

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 56px 28px 72px;
}

.container.narrow { max-width: 760px; }

/* ---------- Header / Nav ---------- */

header.site {
  border-bottom: 1px solid var(--border);
  background: rgba(8, 11, 16, 0.75);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}

header.site .brand {
  font-weight: 600;
  font-size: 17px;
  color: var(--fg);
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

header.site .brand::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

header.site nav {
  margin-left: auto;
  display: flex;
  gap: 22px;
  font-size: 14px;
  flex-wrap: wrap;
}

header.site nav a {
  color: var(--fg-muted);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  text-decoration: none;
  transition: color 120ms ease, border-color 120ms ease;
}
header.site nav a:hover,
header.site nav a.current {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  gap: 4px;
  margin-left: 10px;
  padding: 3px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 12px;
}
.lang-switch a {
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--fg-muted);
  text-decoration: none;
}
.lang-switch a:hover { color: var(--fg); }
.lang-switch a.current {
  background: var(--accent-soft);
  color: var(--fg);
}

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

.hero {
  position: relative;
  padding: 84px 0 72px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(34, 211, 238, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(103, 232, 249, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(30px, 4vw, 44px);
  margin: 0 0 16px;
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.15;
  max-width: 820px;
}

.hero p.lede {
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--fg-muted);
  margin: 0 0 28px;
  max-width: 720px;
  line-height: 1.65;
}

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

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: transform 90ms ease, background 120ms ease, color 120ms ease, border-color 120ms ease;
  will-change: transform;
}
.btn:hover { text-decoration: none; }

.btn.primary {
  background: var(--accent);
  color: #05101a;
  border: 1px solid var(--accent);
}
.btn.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--fg);
}
.btn.ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ---------- Sections ---------- */

section { padding: 56px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }
section h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  margin: 0 0 18px;
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -0.3px;
}
section h2 .accent { color: var(--accent); }
section h3 {
  font-size: 17px;
  margin: 0 0 10px;
  color: var(--fg);
  font-weight: 600;
}
section p { margin: 0 0 14px; color: var(--fg); }
section ul, section ol {
  margin: 0 0 14px 18px;
  color: var(--fg);
  padding: 0;
}
section li { margin-bottom: 6px; }

/* ---------- Cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.grid.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 22px 20px;
  transition: border-color 120ms ease, transform 120ms ease;
}
.card:hover { border-color: var(--border-soft); transform: translateY(-2px); }

.card .icon {
  display: inline-flex;
  width: 32px; height: 32px;
  align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent);
  margin-bottom: 12px;
}
.card .icon svg { width: 18px; height: 18px; }

.card h3 { margin: 0 0 8px; font-size: 16px; }
.card p { font-size: 14.5px; color: var(--fg-muted); margin: 0; line-height: 1.6; }

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
  counter-reset: step;
}
.steps .step {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  position: relative;
}
.steps .step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 40px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.25;
  line-height: 1;
}
.steps .step h3 { font-size: 16px; color: var(--fg); margin: 0 0 8px; }
.steps .step p { font-size: 14.5px; color: var(--fg-muted); margin: 0; line-height: 1.6; }

/* ---------- Kicker / tags ---------- */

.kicker {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  color: var(--accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ---------- FAQ (details/summary, zero JS) ---------- */

.faq-list { margin-top: 20px; display: grid; gap: 10px; }

.faq-list details {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  transition: border-color 120ms ease;
}
.faq-list details[open] { border-color: var(--accent-soft); }
.faq-list summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 500;
  color: var(--fg);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before {
  content: "+";
  display: inline-flex;
  width: 20px; height: 20px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent);
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 120ms ease, background 120ms ease;
}
.faq-list details[open] summary::before { content: "−"; background: var(--accent-soft); color: var(--fg); }
.faq-list .answer {
  padding: 0 18px 16px 50px;
  color: var(--fg-muted);
  font-size: 14.5px;
  line-height: 1.65;
}

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

table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 16px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
table th, table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14.5px;
}
table th {
  color: var(--fg-muted);
  font-weight: 500;
  background: var(--bg-elev);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
table tr:last-child td { border-bottom: none; }

/* ---------- Code ---------- */

code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}
pre {
  background: var(--bg-soft);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow-x: auto;
  color: var(--fg-muted);
  font-size: 13px;
  line-height: 1.6;
}
pre code { background: none; padding: 0; color: inherit; }

/* ---------- Quote / highlight block ---------- */

.callout {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.05), rgba(34, 211, 238, 0.02));
  border: 1px solid var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
  border-radius: var(--radius);
  margin: 20px 0;
  color: var(--fg);
}
.callout strong { color: var(--accent); }

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

footer.site {
  padding: 36px 28px 48px;
  text-align: center;
  color: var(--fg-muted);    /* was --fg-dim, now AA-compliant on bg-soft */
  font-size: 13px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
footer.site a {
  color: var(--fg);          /* strong contrast on bg-soft */
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
footer.site a:hover { color: var(--accent); text-decoration-thickness: 2px; }
footer.site .row { margin-bottom: 10px; }

/* ---------- Utilities ---------- */

.muted { color: var(--fg-muted); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.small { font-size: 13px; }
.lead-separator { margin: 48px 0; border: none; border-top: 1px solid var(--border); }

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .container { padding: 40px 20px 56px; }
  header.site { padding: 12px 18px; gap: 10px; }
  header.site nav { gap: 14px; font-size: 13px; }
  .hero { padding: 48px 0 40px; }
  section { padding: 40px 0; }
}
