/* ════════════════════════════════════════════════════════════
   adhsupport.de — Portal Design System
   Default: helles warmes Theme. Dark via [data-theme="dark"]
   (Toggle in der Nav, Persistenz in localStorage, /assets/theme.js).
   /cockpit (Produktseite) behält unabhängig davon ihr dunkles Theme.
   ════════════════════════════════════════════════════════════ */

:root {
  --void: #FAF9F6;          /* Seitenhintergrund, warm */
  --surface: #FFFFFF;       /* Karten */
  --surface2: #F4F2EC;      /* Hover / Sekundärflächen */
  --surface3: #F8F6F1;      /* Inputs / Tiefe */
  --border: #E8E5DC;
  --border-light: #DBD6C8;
  --t1: #1D1B16;
  --t2: #5D5A50;
  --t3: #84806F;
  --signal: #A87420;        /* Gold, dunkel genug für Text auf hell */
  --signal-glow: #A8742029;
  --signal-dim: #A8742012;
  --blue: #34689E;
  --green: #2F7D46;
  --purple: #6A4C9F;
  --red: #B23E38;
  --btn-bg: #18181B;        /* Primär-Button: dunkle Pille auf hell */
  --btn-fg: #FFFFFF;
  --btn-glow: rgba(24, 24, 27, 0.18);
  --nav-bg: rgba(250, 249, 246, 0.86);
  --nav-bg-solid: rgba(250, 249, 246, 0.98);
  --card-hover-bg: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(29, 27, 22, 0.04);
  --shadow-lift: 0 12px 32px rgba(29, 27, 22, 0.08);
  --shadow-lift-sm: 0 8px 24px rgba(29, 27, 22, 0.07);
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'DM Sans', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

[data-theme="dark"] {
  --void: #0A0C11;
  --surface: #12151E;
  --surface2: #1A1E2B;
  --surface3: #0F1118;
  --border: #252A38;
  --border-light: #2A3048;
  --t1: #E8ECF4;
  --t2: #8A92A8;
  --t3: #6B7186;
  --signal: #D4A24A;
  --signal-glow: #D4A24A33;
  --signal-dim: #D4A24A15;
  --blue: #6B9FD4;
  --green: #6BBF7B;
  --purple: #9878C4;
  --red: #CF5F5F;
  --btn-bg: #D4A24A;        /* Primär-Button: Gold-Pille auf dunkel */
  --btn-fg: #0A0C11;
  --btn-glow: #D4A24A33;
  --nav-bg: rgba(10, 12, 17, 0.82);
  --nav-bg-solid: rgba(10, 12, 17, 0.97);
  --card-hover-bg: #1A1E2B;
  --shadow-sm: none;
  --shadow-lift: none;
  --shadow-lift-sm: none;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--t1);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

::selection { background: var(--signal-glow); }

a { color: var(--signal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── Navigation ─── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  color: var(--t1);
  letter-spacing: -0.01em;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand img { height: 26px; width: auto; display: block; }
.nav-brand .domain { color: var(--t1); }
.nav-brand .domain b { color: var(--signal); font-weight: 800; }

.nav-center {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  color: var(--t2);
  font-size: 14.5px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--t1); background: var(--surface2); text-decoration: none; }
.nav-link.active { color: var(--t1); background: var(--surface2); }

.nav-sos {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--t1);
  padding: 8px 14px;
  border: 1px solid var(--border-light);
  border-radius: 100px;
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-sos:hover { border-color: var(--red); background: #B23E380D; text-decoration: none; }
[data-theme="dark"] .nav-sos:hover { background: #CF5F5F14; }
.nav-sos .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  color: var(--t2);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.theme-toggle:hover { color: var(--t1); border-color: var(--t3); }
.theme-toggle svg { display: block; }
.theme-toggle .ic-sun { display: none; }
[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
[data-theme="dark"] .theme-toggle .ic-moon { display: none; }

.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--t1);
  padding: 7px 11px;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

/* ─── Page scaffold ─── */

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

main { padding-top: 64px; }

.page-head {
  padding: 96px 0 36px;
  max-width: 760px;
}

.section-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 18px;
}

h1 .gradient, .gradient {
  background: linear-gradient(100deg, #A87420, #C9952F);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="dark"] h1 .gradient, [data-theme="dark"] .gradient {
  background: linear-gradient(100deg, #D4A24A, #E8C27D);
  -webkit-background-clip: text;
  background-clip: text;
}

.lead {
  font-size: 18.5px;
  color: var(--t2);
  line-height: 1.7;
  max-width: 640px;
}

.section { padding: 44px 0; }
.section + .section { border-top: 1px solid var(--surface2); }

h2 {
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.015em;
  font-weight: 700;
  margin-bottom: 12px;
}

h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }

p { color: var(--t2); }
p + p { margin-top: 12px; }
strong { color: var(--t1); font-weight: 600; }

/* ─── Buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
}
.btn-primary:hover { box-shadow: 0 8px 24px var(--btn-glow); }

.btn-ghost {
  background: var(--surface);
  color: var(--t1);
  border-color: var(--border-light);
}
.btn-ghost:hover { border-color: var(--t3); background: var(--surface2); }

.btn-danger {
  background: var(--surface);
  color: var(--red);
  border-color: #B23E3855;
}
.btn-danger:hover { background: #B23E380D; }
[data-theme="dark"] .btn-danger { border-color: #CF5F5F55; }
[data-theme="dark"] .btn-danger:hover { background: #CF5F5F14; }

/* ─── Cards & Grids ─── */

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  color: var(--t1);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
a.card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  border-color: var(--border-light);
  background: var(--card-hover-bg);
  box-shadow: var(--shadow-lift);
}
.card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--signal-dim);
  color: var(--signal);
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: 14.5px; line-height: 1.6; }
.card .more {
  display: inline-block;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--signal);
}

.icon-blue { background: #34689E14 !important; color: var(--blue) !important; }
.icon-green { background: #2F7D4612 !important; color: var(--green) !important; }
.icon-purple { background: #6A4C9F14 !important; color: var(--purple) !important; }
.icon-red { background: #B23E3812 !important; color: var(--red) !important; }
[data-theme="dark"] .icon-blue { background: #6B9FD418 !important; }
[data-theme="dark"] .icon-green { background: #6BBF7B16 !important; }
[data-theme="dark"] .icon-purple { background: #9878C418 !important; }
[data-theme="dark"] .icon-red { background: #CF5F5F16 !important; }

/* ─── Listen-Einträge (Verzeichnis) ─── */

.entry {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.entry + .entry { margin-top: 12px; }
a.entry:hover { text-decoration: none; border-color: var(--border-light); background: var(--card-hover-bg); box-shadow: var(--shadow-lift-sm); }
.entry .entry-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.entry h3 { color: var(--t1); }
.entry .host {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--t3);
}
.entry p { font-size: 14.5px; }

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--t2);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
  margin-right: 6px;
  margin-top: 10px;
}

/* ─── Krisen-Elemente ─── */

.crisis-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: center;
  font-size: 14px;
  color: var(--t2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 12px 18px;
}
.crisis-line strong { color: var(--t1); }
.crisis-line a { white-space: nowrap; }

.crisis-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.crisis-card.calm { border-left-color: var(--signal); }
.crisis-card .number {
  font-family: var(--mono);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 500;
  color: var(--t1);
  display: block;
  margin: 6px 0 4px;
}
.crisis-card .number a { color: var(--t1); }
.crisis-card .meta { font-size: 13.5px; color: var(--t3); }

/* ─── Hinweis-Boxen ─── */

.note {
  background: var(--signal-dim);
  border: 1px solid #A874202E;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 14.5px;
  color: var(--t2);
}
[data-theme="dark"] .note { border-color: #D4A24A2E; }
.note strong { color: var(--signal); }

/* ─── Footer ─── */

footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  padding: 44px 0 56px;
}
[data-theme="dark"] footer { background: var(--surface3); }

.footer-disclaimer {
  font-size: 13.5px;
  color: var(--t3);
  line-height: 1.7;
  max-width: 720px;
  margin-bottom: 28px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-bottom: 10px;
}
.footer-links a { color: var(--t2); font-size: 14px; }
.footer-links a:hover { color: var(--t1); }

.footer-copy {
  font-size: 13px;
  color: var(--t3);
  margin-top: 18px;
}

/* ─── Reveal (dezent, abschaltbar) ─── */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, a.card:hover { transform: none; }
  body { transition: none; }
}

/* ─── Responsive ─── */

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-center {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--nav-bg-solid);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px 16px;
    gap: 2px;
  }
  .nav-center.open { display: flex; }
  .nav-link { padding: 12px 14px; font-size: 16px; }
  .nav-toggle { display: block; }
}

@media (max-width: 700px) {
  .grid, .grid-2 { grid-template-columns: 1fr; }
  .page-head { padding: 76px 0 28px; }
  .section { padding: 36px 0; }
  .nav-sos span.label { display: none; }
  .nav-sos::after { content: "Notfall"; }
}
