/* Gingerlemon – Phishing-Awareness-Onepager im Flaschen-Look (Simpliq CI)
   Farben: Navy aus dem Simpliq-Logo, Orange/Blaugrau aus der Ingwer-Illustration. */

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #162E50;
  --navy-deep: #0F2240;
  --navy-raised: #1D3A63;
  --line: rgba(255, 255, 255, 0.12);
  --orange: #F8AE3C;
  --orange-deep: #E8A43D;
  --slate: #55708C;
  --text: #FFFFFF;
  --muted: #B4C2D4;

  --radius: 18px;
  --wrap: 44rem;
  --gutter: clamp(1.25rem, 5vw, 2rem);
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); }
h1, h2, h3 { font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.65rem, 6.5vw, 2.5rem); }
h3 { font-size: 1.125rem; }
p { margin: 0; }
.accent { color: var(--orange); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 1. Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: max(3.5rem, env(safe-area-inset-top));
  padding-bottom: 4.5rem;
  overflow: hidden;
  background:
    radial-gradient(120% 60% at 30% 100%, rgba(248, 174, 60, 0.10), transparent 60%),
    var(--navy);
}
.hero__warning {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(52px, 13vw, 64px);
  height: clamp(52px, 13vw, 64px);
  margin-bottom: 1.5rem;
  border-radius: 18px;
  color: var(--orange);
  background: rgba(248, 174, 60, 0.12);
  border: 1px solid rgba(248, 174, 60, 0.35);
}
.hero__warning svg { width: 56%; height: 56%; }
.hero__warning::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(248, 174, 60, 0.7);
  animation: warn-ring 2.4s ease-out infinite;
}
@keyframes warn-ring {
  0% { transform: scale(1); opacity: 0.8; }
  70%, 100% { transform: scale(1.4); opacity: 0; }
}
.hero__title {
  font-size: clamp(2.5rem, 11.5vw, 6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.hero__line { display: block; white-space: nowrap; }
.hero__lead {
  margin-top: 1.5rem;
  font-size: clamp(1.15rem, 4.6vw, 1.45rem);
  line-height: 1.45;
  max-width: 34rem;
}
.hero__calm {
  margin-top: 1.5rem;
  padding: 0.85rem 1.1rem;
  max-width: 34rem;
  border-left: 3px solid var(--orange);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.98rem;
}
.hero__visual {
  position: relative;
  width: 100%;
  max-width: 54rem;
  margin: 2rem auto 0;
  padding-inline: var(--gutter);
}
.hero__art {
  width: 118%;
  max-width: none;
  margin-left: -9%;
}
.hero__logo {
  position: absolute;
  right: var(--gutter);
  bottom: -0.5rem;
  width: clamp(48px, 13vw, 72px);
  height: auto;
}
.hero__next {
  position: absolute;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--muted);
  border-radius: 50%;
  animation: nudge 2.4s ease-in-out infinite;
}
.hero__next:hover, .hero__next:focus-visible { color: var(--orange); }
@keyframes nudge {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

@media (min-width: 800px) {
  .hero { padding-top: 5rem; }
  .hero__text { max-width: 54rem; }
  .hero__visual { margin-top: 1rem; }
  .hero__art { width: 100%; margin-left: 0; }
}

/* ---------- Abschnitte ---------- */

.section { padding-block: clamp(4rem, 12vw, 6.5rem); }
.section--alt { background: var(--navy-deep); }
.section__lead { margin-top: 0.75rem; color: var(--muted); font-size: 1.1rem; }
.eyebrow {
  margin-bottom: 0.6rem;
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.prose { margin-top: 1.25rem; font-size: 1.1rem; color: #E6ECF3; max-width: 38rem; }

/* ---------- 2. Live-View ---------- */

.facts {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.fact {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.9rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--navy-raised);
}
.fact__icon {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: rgba(248, 174, 60, 0.14);
  font-size: 1.25rem;
}
.fact__label { color: var(--muted); font-size: 0.85rem; }
.fact__label small { color: var(--slate); font-size: 0.78rem; margin-left: 0.25rem; }
.fact__value {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.fact__value--mono { font-family: var(--mono); font-size: 1rem; letter-spacing: 0.01em; }

.facts[data-state="loading"] .fact__value {
  color: transparent;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.16) 50%, rgba(255,255,255,0.06) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  max-width: 14rem;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.facts[data-state="ready"] .fact { animation: fact-in 0.5s ease both; }
.facts[data-state="ready"] .fact:nth-child(2) { animation-delay: 0.12s; }
.facts[data-state="ready"] .fact:nth-child(3) { animation-delay: 0.24s; }
.facts[data-state="ready"] .fact:nth-child(4) { animation-delay: 0.36s; }
.facts[data-state="ready"] .fact:nth-child(5) { animation-delay: 0.48s; }
.facts[data-state="ready"] .fact:nth-child(6) { animation-delay: 0.60s; }
@keyframes fact-in { from { opacity: 0; transform: translateY(8px); } }

.facts__error { margin-top: 1rem; color: var(--muted); }

.punchline {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.15rem, 4.5vw, 1.35rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--orange);
}

@media (min-width: 720px) {
  .facts { grid-template-columns: 1fr 1fr; }
}

/* ---------- 4. Kacheln ---------- */

.tiles {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.tile {
  padding: 1.4rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--navy-raised);
}
.tile__icon { display: block; font-size: 1.75rem; margin-bottom: 0.75rem; }
.tile p { margin-top: 0.4rem; color: var(--muted); font-size: 0.98rem; }
@media (min-width: 720px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 5. Checkliste ---------- */

.checklist { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1rem; }
.checklist li {
  position: relative;
  padding-left: 2.6rem;
  font-size: 1.05rem;
  line-height: 1.5;
}
.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23162E50' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 1.1rem no-repeat;
}

/* ---------- 6. CTA ---------- */

.cta {
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(248, 174, 60, 0.16), transparent 60%),
    var(--navy);
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.95rem 1.5rem;
  min-height: 48px;
  border-radius: 999px;
  background: var(--orange);
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.button:hover { background: #FFC266; }
.button:active { transform: translateY(1px); }
.button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---------- 7. Footer ---------- */

.footer {
  padding-block: 2.5rem calc(2.5rem + env(safe-area-inset-bottom));
  background: var(--navy-deep);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}
.footer__privacy { margin-top: 1.25rem; max-width: 38rem; }
.footer__attribution { margin-top: 0.75rem; color: var(--slate); }
.footer__attribution a { color: var(--muted); }

/* ---------- Scroll-Reveal (nur mit JS, siehe landing.js) ---------- */

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero__next, .facts[data-state="loading"] .fact__value, .facts[data-state="ready"] .fact { animation: none; }
  .hero__warning::after { display: none; }
}


/* =====================================================================
   Admin-Dashboard – ein Navy, durchscheinende Karten, keine Farbbalken
   ===================================================================== */

.admin {
  --card: rgba(255, 255, 255, 0.035);   /* ergibt ca. #1E3556 – Diagrammfarben dagegen validiert */
  --card-line: rgba(255, 255, 255, 0.08);
  --grid: rgba(255, 255, 255, 0.07);
  --axis: rgba(255, 255, 255, 0.22);
  --ink-2: #B4C2D4;
  --ink-3: #8EA2BA;
  font-size: 0.95rem;
}

.admin__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.75rem var(--gutter) 0.5rem;
}
.admin__brand { display: flex; align-items: center; gap: 0.75rem; }
.admin__brand h1 { font-size: 1.1rem; font-weight: 600; letter-spacing: 0; }
.admin__user { display: flex; align-items: center; gap: 0.9rem; color: var(--ink-2); font-size: 0.85rem; }
.admin__logout {
  color: var(--text);
  text-decoration: none;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  font-size: 0.8rem;
  transition: border-color 0.15s ease;
}
.admin__logout:hover, .admin__logout:focus-visible { border-color: var(--orange); }

.admin__main {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1rem var(--gutter) 4rem;
  display: grid;
  gap: 1.25rem;
}

.card {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--card-line);
  border-radius: 16px;
  background: var(--card);
}
.card h2 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.card__hint { margin-left: 0.4rem; color: var(--ink-3); font-size: 0.8rem; font-weight: 400; }
.card-grid { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Leitzahl */
.hero-stat { padding: 1.5rem 0 0.5rem; }
.hero-stat__label { color: var(--ink-2); font-size: 0.95rem; }
.hero-stat__value {
  margin-top: 0.25rem;
  font-size: clamp(3.5rem, 12vw, 6.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--orange);
}
.hero-stat__meta { margin-top: 0.6rem; color: var(--ink-3); font-size: 0.85rem; }

/* Filterzeile */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1.25rem; }
.presets {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  background: var(--card);
}
.admin .presets button {
  font: inherit;
  font-size: 0.85rem;
  min-height: 34px;
  padding: 0 0.95rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.admin .presets button:hover { color: var(--text); }
.admin .presets button[aria-pressed="true"] { background: var(--orange); color: var(--navy); font-weight: 600; }
.filters__custom { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; }
.filters .status { flex-basis: 100%; }

.admin label { display: grid; gap: 0.25rem; color: var(--ink-3); font-size: 0.78rem; }
.admin input {
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-line);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  min-height: 38px;
  color-scheme: dark;
}
.admin input:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.admin button {
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  min-height: 38px;
  padding: 0 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--orange);
  color: var(--navy);
  cursor: pointer;
}
.admin button.button--ghost { background: transparent; color: var(--text); border: 1px solid var(--card-line); }
.admin button.button--ghost:hover { border-color: var(--orange); }
.status { color: var(--ink-3); font-size: 0.82rem; min-height: 1.2em; }

/* Beim Nachladen den alten Stand gedimmt stehen lassen (kein Flackern) */
.stats-area { display: grid; gap: 1.25rem; transition: opacity 0.2s ease; }
.stats-area.is-refreshing { opacity: 0.6; }

/* Kennzahl-Kacheln */
.kpis { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi {
  min-width: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--card-line);
  border-radius: 16px;
  background: var(--card);
}
.kpi__label { color: var(--ink-2); font-size: 0.82rem; }
.kpi__value { margin-top: 0.2rem; font-size: 1.9rem; font-weight: 600; line-height: 1.2; }
.kpi__sub { margin-top: 0.15rem; color: var(--ink-3); font-size: 0.78rem; }
.kpi__spark { margin-top: 0.35rem; height: 36px; }

/* Diagramme */
.chart { width: 100%; }
.viz-svg { display: block; overflow: visible; font-family: var(--font); }
.viz-grid { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.viz-baseline { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.viz-tick { fill: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-value { fill: var(--text); font-size: 12px; font-weight: 600; }
.viz-bar, .viz-rank__bar, .viz-seg__block { transition: filter 0.12s ease; }
.viz-bar.is-hover, .viz-rank__bar.is-hover, .viz-seg__block.is-hover { filter: brightness(1.18); }
.viz-hit { fill: transparent; cursor: default; outline: none; }
.viz-hit:focus-visible { fill: rgba(255, 255, 255, 0.05); }
.viz-empty { color: var(--ink-3); font-size: 0.85rem; }

/* Segmentierter Balken */
.viz-seg { display: flex; gap: 2px; height: 28px; }
.viz-seg__block {
  display: flex;
  align-items: center;
  min-width: 2px;
  padding-left: 0.5rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: visible;
  outline: none;
}
.viz-seg__block:focus-visible { box-shadow: 0 0 0 2px var(--text); }
.viz-legend { list-style: none; margin: 0.9rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; color: var(--ink-2); font-size: 0.82rem; }
.viz-legend li { display: inline-flex; align-items: center; gap: 0.45rem; }
.viz-legend__swatch { width: 10px; height: 10px; border-radius: 2px; }

/* Rangliste */
.viz-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.viz-rank__row {
  display: grid;
  grid-template-columns: minmax(0, 11.5rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.4rem;
  margin: 0 -0.4rem;
  border-radius: 8px;
  outline: none;
}
.viz-rank__row:hover, .viz-rank__row:focus-visible { background: rgba(255, 255, 255, 0.04); }
.viz-rank__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; }
.viz-rank__track { display: block; height: 10px; }
.viz-rank__bar { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.viz-rank__value { font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
@media (max-width: 420px) {
  .viz-rank__row { grid-template-columns: minmax(0, 1fr) auto; }
  .viz-rank__track { grid-column: 1 / -1; grid-row: 2; }
}

/* Tooltip */
.viz-tip {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  min-width: 7rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #0B1A30;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.8rem;
}
.viz-tip__title { color: var(--ink-2); margin-bottom: 0.2rem; }
.viz-tip__row { display: flex; align-items: center; gap: 0.45rem; }
.viz-tip__key { width: 12px; height: 2px; border-radius: 1px; }
.viz-tip__value { font-size: 0.95rem; }
.viz-tip__label { color: var(--ink-3); }

/* Tabellen (auch als Tabellen-Ansicht unter den Diagrammen) */
.table-view { margin-top: 0.75rem; }
.table-view summary { color: var(--ink-3); font-size: 0.8rem; cursor: pointer; width: max-content; }
.table-view summary:hover { color: var(--text); }
.table-view[open] summary { margin-bottom: 0.5rem; }
.table-wrap { overflow-x: auto; }
.admin table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.admin th, .admin td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--card-line); white-space: nowrap; }
.admin th { color: var(--ink-3); font-weight: 400; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.admin td { font-variant-numeric: tabular-nums; }
.admin tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }

.mapping-form { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
