/* DDoSGuard – Welt „Wellenbrecher“ · gemeinsame Basis der Landing Page
   Dieselben Token wie das Panel (web/style.css) – bei Änderungen beide Dateien anpassen.
   Einziger Unterschied: Auf der Landing ist der Seitengrund weiß (--bg), im Panel der weiche Ton (--bg-soft).
   Klassennamen wie im freigegebenen Entwurf 7 (design-proposals/7): .btn-primary, .pill, .ic, .logo, .chart.
   CSP der Landing: style-src 'self' – keine Inline-Styles; Bilder als data:-URI sind erlaubt.
   Signalrot (--alert*, --attack*) nur für Under Attack Mode und Angriffe. */

@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* ================= Token ================= */
:root {
  /* Marke: feste Werte */
  --sea: #0a7d6c; --sea-600: #086a5c; --sea-700: #06564b;
  --sea-50: #eef9f6; --sea-100: #daf3ec; --sea-200: #b5e6d9; --sea-300: #86d6c3; --mint: #45cfae;
  --ink: #0b2424; --ink-2: #2c4544; --muted: #536a68; --deep: #0b2f2d; --deep-2: #103d3a;
  --amber: #b9770a; --amber-50: #fdf4e0; --amber-fill: #eaa81f;
  --alert: #c93a1e; --alert-600: #ad2f16; --alert-50: #fff1ec; --alert-100: #ffdfd5;

  /* Schrift */
  --font: "Geist", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --sans: var(--font);
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* Abstände (4er-Raster) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-14: 56px;

  /* Radien */
  --r-xs: 6px; --r-sm: 8px; --r-md: 10px; --r: 12px; --r-lg: 14px; --r-xl: 18px; --r-pill: 999px;
  --radius: var(--r-xl); --radius-s: var(--r);

  /* Bewegung */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --dur-1: .15s; --dur-2: .22s; --dur-3: .35s;
}

/* Hell (Standard der Landing) */
:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff; --bg-soft: #f4f9f7;
  --surface: #ffffff; --surface-2: #f4f9f7; --surface-3: #e9f2ef; --raise: #ffffff;
  --hover: rgba(11, 47, 45, .05); --press: rgba(11, 47, 45, .09);
  --line: #dfeae7; --line-2: #cbdcd8; --line-3: #a3bcb7;
  --fg: #0b2424; --fg-2: #2c4544; --fg-3: #536a68;
  --accent: #0a7d6c; --accent-hover: #086a5c; --accent-press: #06564b; --on-accent: #ffffff;
  --accent-ink: #06564b; --accent-soft: #eef9f6; --accent-soft-2: #daf3ec; --accent-line: #86d6c3;
  --ok: #0a7d6c; --ok-ink: #06564b; --ok-soft: #eaf7f3; --ok-ring: #b5e6d9;
  --warn: #eaa81f; --warn-ink: #8a5600; --warn-soft: #fdf4e0; --warn-ring: #f1d9a0;
  --bad-solid: #0b2f2d; --bad-on: #ffffff; --bad-soft: #e9f0ee;
  --attack: #c93a1e; --attack-hover: #ad2f16; --attack-ink: #ad2f16; --attack-soft: #fff1ec; --attack-soft-2: #ffdfd5; --attack-line: #c93a1e; --on-attack: #ffffff;
  --neutral-soft: #eef2f1;
  --shadow-s: 0 1px 2px rgba(11, 36, 36, .06), 0 2px 8px rgba(11, 36, 36, .05);
  --shadow-m: 0 2px 4px rgba(11, 36, 36, .05), 0 12px 32px -8px rgba(11, 36, 36, .14);
  --shadow-l: 0 4px 8px rgba(11, 36, 36, .05), 0 32px 64px -16px rgba(11, 36, 36, .24);
  --shadow-primary: 0 1px 2px rgba(11, 36, 36, .18), 0 6px 14px -6px rgba(11, 36, 36, .28);
  --focus: #0a7d6c; --focus-soft: #daf3ec;
  /* Daten: durchgelassen = Seegrün, geprüft = Bernstein, blockiert = Tiefe */
  --pass: #0a7d6c; --chal: #eaa81f; --blk: #0b2f2d;
}

/* Dunkel: nur auf ausdrücklichen Wunsch (data-theme="dark"); die Landing folgt nicht dem System */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b2424; --bg-soft: #0c2928;
  --surface: #102f2e; --surface-2: #0c2928; --surface-3: #183d3b; --raise: #153837;
  --hover: rgba(181, 230, 217, .06); --press: rgba(181, 230, 217, .11);
  --line: rgba(181, 230, 217, .11); --line-2: rgba(181, 230, 217, .19); --line-3: rgba(181, 230, 217, .34);
  --fg: #e8f4f1; --fg-2: #b9d0cb; --fg-3: #8aa8a2;
  --accent: #45cfae; --accent-hover: #62dbbe; --accent-press: #35b998; --on-accent: #052b25;
  --accent-ink: #7fe0c8; --accent-soft: rgba(69, 207, 174, .11); --accent-soft-2: rgba(69, 207, 174, .2); --accent-line: rgba(69, 207, 174, .5);
  --ok: #45cfae; --ok-ink: #8fe3cd; --ok-soft: rgba(69, 207, 174, .12); --ok-ring: rgba(69, 207, 174, .32);
  --warn: #eaa81f; --warn-ink: #f3cd7e; --warn-soft: rgba(234, 168, 31, .13); --warn-ring: rgba(234, 168, 31, .34);
  --bad-solid: #dcebe7; --bad-on: #0b2424; --bad-soft: rgba(220, 235, 231, .1);
  --attack: #c93a1e; --attack-hover: #dd4a2c; --attack-ink: #ffa48f; --attack-soft: rgba(233, 88, 58, .15); --attack-soft-2: rgba(233, 88, 58, .26); --attack-line: #e2573a; --on-attack: #ffffff;
  --neutral-soft: rgba(181, 230, 217, .09);
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .28), 0 2px 8px rgba(0, 0, 0, .18);
  --shadow-m: 0 2px 4px rgba(0, 0, 0, .3), 0 12px 32px -8px rgba(0, 0, 0, .5);
  --shadow-l: 0 4px 8px rgba(0, 0, 0, .3), 0 32px 64px -16px rgba(0, 0, 0, .7);
  --shadow-primary: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 16px -8px rgba(0, 0, 0, .5);
  --focus: #45cfae; --focus-soft: rgba(69, 207, 174, .24);
  --pass: #45cfae; --chal: #eaa81f; --blk: #dcebe7;
}

/* ================= Grundlagen ================= */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--sea-200) transparent; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.55; color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; overflow-x: clip; }
::selection { background: var(--accent-soft-2); color: var(--fg); }
input, textarea { caret-color: var(--accent); }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -.03em; line-height: 1.08; font-weight: 650; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
svg text { font-family: var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, kbd, .mono { font-family: var(--mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--r-xs); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-md); transition: top .2s var(--ease); }
.skip:focus { top: 12px; }
/* Textlink im Fließtext */
.link { color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color var(--dur-1); }
.link:hover { text-decoration-color: currentColor; }

/* Typo-Rollen der Landing (fließend, Obergrenze 4.6rem) */
.t-display { font-size: clamp(2.35rem, 5.9vw, 4.6rem); letter-spacing: -.04em; line-height: 1.02; font-weight: 680; }
.t-h2 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); letter-spacing: -.035em; line-height: 1.08; font-weight: 650; }
.t-h3 { font-size: 1.25rem; letter-spacing: -.02em; line-height: 1.25; font-weight: 650; }
.t-lead { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--fg-2); max-width: 60ch; }
.t-small { font-size: .9063rem; color: var(--fg-3); }

/* ================= Logo ================= */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; letter-spacing: -.03em; color: var(--fg); }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo b { font-weight: 700; color: var(--accent); }

/* ================= Buttons ================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: var(--r); border: 1px solid transparent; background: transparent; font-weight: 600; font-size: 1rem; line-height: 1.2; white-space: nowrap; transition: background-color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-primary); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); background: var(--accent-press); }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn-quiet { color: var(--fg-2); padding: 0 12px; }
.btn-quiet:hover { color: var(--accent-ink); background: var(--accent-soft); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .9375rem; border-radius: var(--r-md); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn:focus-visible { border-radius: var(--r); }

/* ================= Icons: eine Strichstärke, runde Enden ================= */
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ================= Status-Pillen ================= */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: .8125rem; font-weight: 600; white-space: nowrap; background: var(--ok-soft); color: var(--ok-ink); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.is-alert { background: var(--attack-soft); color: var(--attack-ink); }   /* nur Angriff */
.pill.is-wait { background: var(--warn-soft); color: var(--warn-ink); }
.pill.is-off { background: var(--neutral-soft); color: var(--fg-3); }
.pill.is-deep { background: var(--bad-solid); color: var(--bad-on); }          /* blockiert, gesperrt */
.pill.is-plain::before { display: none; }

/* ================= Karten ================= */
.card { padding: 22px 24px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); min-width: 0; }
.card-soft { background: var(--surface-2); box-shadow: none; }
.card-deep { background: var(--deep); border-color: var(--deep); color: #fff; }

/* ================= Felder ================= */
.input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--fg); font-size: 1rem; transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
.input::placeholder { color: var(--fg-3); opacity: 1; }
.input:hover { border-color: var(--line-3); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus-soft); }

/* ================= Diagramm (Vorschau) ================= */
.chart { width: 100%; height: auto; }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .ax { font-size: 11px; fill: var(--fg-3); font-variant-numeric: tabular-nums; }
.chart .a-pas { fill: var(--pass); }
.chart .a-chl { fill: var(--chal); }
.chart .a-blk { fill: var(--blk); }
.chart .mark { stroke: var(--attack-line); stroke-width: 1.5; stroke-dasharray: 3 4; }
.chart .marklbl { font-size: 11.5px; font-weight: 600; fill: var(--attack-ink); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .875rem; color: var(--fg-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--pass); }
.legend .l-chl i { background: var(--chal); }
.legend .l-blk i { background: var(--blk); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
