/* ============================================================
   ATS-Check — „Prüfbericht"-Design
   Papier, Tinte, Ultramarin-Scan, Prüfstempel.
   ============================================================ */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Bebas Neue';
  src: url('../fonts/bebas-neue-latin-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --bg: #edf0f4;
  --paper: #ffffff;
  --ink: #16202e;
  --muted: #5c6b7c;
  --line: #dde3ea;
  --line-strong: #c3ccd6;
  --scan: #2450f4;
  --scan-soft: rgba(36, 80, 244, 0.07);
  --pass: #0c9f6e;
  --pass-soft: rgba(12, 159, 110, 0.1);
  --warn: #d98a00;
  --warn-soft: rgba(217, 138, 0, 0.12);
  --fail: #d94848;
  --fail-soft: rgba(217, 72, 72, 0.1);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(22, 32, 46, 0.05), 0 12px 40px -12px rgba(22, 32, 46, 0.18);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; }

body {
  background: var(--bg);
  background-image: radial-gradient(rgba(22,32,46,0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

::selection { background: var(--scan); color: #fff; }
a { color: var(--scan); }
:focus-visible { outline: 3px solid var(--scan); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; padding: 0;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0 0;
}
.wordmark {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px; letter-spacing: 2px;
  text-decoration: none; color: var(--ink);
}
.wordmark__box {
  background: var(--scan); color: #fff;
  padding: 2px 9px 0; border-radius: 6px;
  font-size: 22px; letter-spacing: 2px;
}
.top__note { font-size: 12.5px; color: var(--muted); font-family: var(--mono); }
@media (max-width: 620px) { .top__note { display: none; } }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 56px 0 8px; }
.hero__kicker {
  display: inline-block;
  font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--scan);
  border: 1px solid var(--scan);
  border-radius: 100px;
  padding: 4px 14px; margin-bottom: 22px;
  background: var(--scan-soft);
}
h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(46px, 9vw, 88px);
  line-height: 0.96;
  letter-spacing: 1px;
  font-weight: 400;
}
h1 .u {
  color: var(--scan);
  position: relative;
  white-space: nowrap;
}
.hero__sub {
  max-width: 560px; margin: 20px auto 0;
  color: var(--muted); font-size: clamp(15px, 2.2vw, 17.5px);
}
.hero__sub b { color: var(--ink); }

/* ---------- Fakten-Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px 0 0; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 7px 15px;
  font-size: 13px; font-weight: 500; color: var(--muted);
}
.chip svg { flex: none; color: var(--pass); }

/* ---------- Upload-Karte ---------- */
.stage { margin: 40px auto 80px; }

.dropcard {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}
.drop {
  border: 2px dashed var(--line-strong);
  border-radius: 10px;
  padding: 52px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
}
.drop:hover, .drop:focus-visible { border-color: var(--scan); background: var(--scan-soft); }
.drop--over { border-color: var(--scan); background: var(--scan-soft); border-style: solid; }
.drop__icon {
  width: 64px; height: 80px; margin: 0 auto 18px;
  border: 2.5px solid var(--ink);
  border-radius: 6px;
  position: relative;
  background: #fff;
}
.drop__icon::before, .drop__icon::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 3px;
  background: var(--line-strong); border-radius: 2px;
}
.drop__icon::before { top: 16px; box-shadow: 0 9px 0 var(--line-strong), 0 18px 0 var(--line-strong); }
.drop__icon::after { top: 52px; width: 26px; background: var(--scan); }
.drop__title { font-size: 19px; font-weight: 700; }
.drop__title .link { color: var(--scan); text-decoration: underline; text-underline-offset: 3px; }
.drop__meta { margin-top: 8px; font-size: 13px; color: var(--muted); font-family: var(--mono); }
.drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop__demo {
  background: none; border: none; cursor: pointer;
  font-family: var(--mono); font-size: 13px;
  color: var(--scan); text-decoration: underline; text-underline-offset: 3px;
  position: relative; z-index: 2;
  padding: 2px 4px;
}

/* Stellenanzeige (optional) */
.jobbox { margin-top: 14px; }
.jobbox summary {
  cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink);
  padding: 12px 6px; list-style: none; display: flex; align-items: center; gap: 8px;
}
.jobbox summary::-webkit-details-marker { display: none; }
.jobbox summary .plus {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--scan-soft); color: var(--scan);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; transition: transform .2s;
}
.jobbox[open] summary .plus { transform: rotate(45deg); }
.jobbox summary .opt { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.jobbox textarea {
  width: 100%; min-height: 130px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  padding: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--ink);
  resize: vertical;
  background: #fbfcfe;
}
.jobbox textarea:focus { outline: none; border-color: var(--scan); }

/* ---------- Analyse-Phase ---------- */
.scanning {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px 32px;
  text-align: center;
}
.scanning__doc {
  width: 88px; height: 112px;
  margin: 0 auto 26px;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  background: repeating-linear-gradient(180deg, transparent 0 14px, var(--line) 14px 17px);
  background-position: 0 18px;
}
.scanning__beam {
  position: absolute; left: -6px; right: -6px; height: 34px; top: -40px;
  background: linear-gradient(180deg, transparent, rgba(36,80,244,0.28) 55%, var(--scan) 100%);
  border-bottom: 2.5px solid var(--scan);
  animation: beam 1.4s ease-in-out infinite;
}
@keyframes beam { 0% { top: -40px; } 55% { top: 108px; } 100% { top: -40px; } }
.scanning h2 { font-family: 'Bebas Neue', sans-serif; font-size: 30px; letter-spacing: 1.5px; font-weight: 400; }
.scanlist { max-width: 380px; margin: 22px auto 0; text-align: left; }
.scanlist li {
  list-style: none;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0;
  font-size: 14.5px; color: var(--muted);
  font-family: var(--mono);
  opacity: 0.35;
  transition: opacity .3s;
}
.scanlist li.on { opacity: 1; color: var(--ink); }
.scanlist li .tick {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 2px solid var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff;
}
.scanlist li.on .tick { background: var(--pass); border-color: var(--pass); }

/* ---------- Prüfbericht ---------- */
.report {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.report__head {
  border-bottom: 2px solid var(--ink);
  padding: 26px 32px 20px;
  display: flex; flex-wrap: wrap; gap: 12px 28px;
  align-items: baseline; justify-content: space-between;
}
.report__title { font-family: 'Bebas Neue', sans-serif; font-size: 34px; letter-spacing: 1.5px; font-weight: 400; }
.report__meta {
  display: flex; flex-wrap: wrap; gap: 4px 22px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.report__meta b { color: var(--ink); font-weight: 600; }

/* Score-Zeile: Zahl + Stempel + Kategorien */
.verdict {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px 40px;
  padding: 40px 32px 32px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: relative;
}
@media (max-width: 680px) { .verdict { grid-template-columns: 1fr; } }

.score { text-align: center; position: relative; }
.score__num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 110px; line-height: 0.9;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}
.score__of { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* Der Stempel — Signatur-Element */
.stamp {
  position: absolute;
  top: -22px; right: 30px;
  border: 3.5px solid;
  border-radius: 8px;
  padding: 8px 18px 5px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px; letter-spacing: 3.5px;
  line-height: 1;
  transform: rotate(-8deg);
  opacity: 0.92;
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3.5px currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.55' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 .1'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-size: 130px;
}
.stamp--pass { color: var(--pass); }
.stamp--warn { color: var(--warn); }
.stamp--fail { color: var(--fail); }
@media (max-width: 680px) {
  .stamp { position: static; display: inline-block; margin-top: 6px; }
  .score { margin-bottom: 8px; }
}
@keyframes stampIn {
  0%   { transform: rotate(-8deg) scale(2.4); opacity: 0; }
  55%  { transform: rotate(-8deg) scale(0.92); opacity: 1; }
  100% { transform: rotate(-8deg) scale(1); opacity: 0.92; }
}
.stamp.in { animation: stampIn .45s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: .9s; }

/* Kategorie-Balken */
.cats { display: grid; gap: 13px; }
.cat { display: grid; grid-template-columns: 150px 1fr 44px; gap: 14px; align-items: center; font-size: 14px; }
@media (max-width: 480px) { .cat { grid-template-columns: 110px 1fr 40px; } }
.cat__name { font-weight: 600; }
.cat__name .na { color: var(--muted); font-weight: 400; font-size: 12px; }
.cat__track { height: 9px; background: var(--bg); border-radius: 100px; overflow: hidden; }
.cat__fill {
  height: 100%; width: 0;
  border-radius: 100px;
  transition: width .9s cubic-bezier(.2, .7, .3, 1);
}
.cat__fill--pass { background: var(--pass); }
.cat__fill--warn { background: var(--warn); }
.cat__fill--fail { background: var(--fail); }
.cat__val { font-family: var(--mono); font-size: 13px; text-align: right; color: var(--muted); }

/* ---------- Findings ---------- */
.findings { padding: 28px 32px 36px; }
.findings h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px; letter-spacing: 1.5px; font-weight: 400;
  margin-bottom: 4px;
}
.findings__sub { font-size: 13.5px; color: var(--muted); margin-bottom: 20px; }

.fgroup { margin-bottom: 26px; }
.fgroup__head {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.fgroup__head::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.finding {
  display: flex; gap: 14px;
  padding: 13px 14px;
  border-radius: 10px;
  margin-bottom: 8px;
  align-items: flex-start;
}
.finding--pass { background: var(--pass-soft); }
.finding--warn { background: var(--warn-soft); }
.finding--fail { background: var(--fail-soft); }
.finding__badge {
  flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700;
  margin-top: 1px;
}
.finding--pass .finding__badge { background: var(--pass); }
.finding--warn .finding__badge { background: var(--warn); }
.finding--fail .finding__badge { background: var(--fail); }
.finding__label { font-weight: 600; font-size: 14.5px; }
.finding__fix { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.finding__fix b, .finding__fix code { color: var(--ink); }
.finding__fix code { font-family: var(--mono); font-size: 12.5px; background: var(--bg); padding: 1px 6px; border-radius: 5px; }

.kwchips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.kwchip {
  font-family: var(--mono); font-size: 12px;
  border: 1px dashed var(--fail);
  color: var(--fail);
  border-radius: 100px;
  padding: 3px 11px;
}
.kwchip--have { border: 1px solid var(--pass); color: var(--pass); border-style: solid; }

/* ---------- Aktionen ---------- */
.actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  padding: 0 32px 34px;
}
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  border: none; cursor: pointer;
  border-radius: 10px;
  padding: 13px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 15px; font-weight: 600;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--scan); color: #fff; box-shadow: 0 8px 24px -8px rgba(36,80,244,.5); }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line-strong); }

/* ---------- Fehlerbox ---------- */
.errbox {
  background: var(--fail-soft);
  border: 1.5px solid var(--fail);
  color: var(--ink);
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 14px;
  font-size: 14.5px;
}
.errbox b { color: var(--fail); }

/* ---------- FAQ / Info ---------- */
.info { margin: 56px 0 60px; }
.info h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px; letter-spacing: 1.5px; font-weight: 400;
  margin-bottom: 18px; text-align: center;
}
.info__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .info__grid { grid-template-columns: 1fr; } }
.info__card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.info__card h3 { font-size: 15.5px; margin-bottom: 8px; }
.info__card p { font-size: 13.5px; color: var(--muted); }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 24px 0 34px;
  display: flex; flex-wrap: wrap; gap: 10px 24px;
  justify-content: space-between;
  font-size: 13px; color: var(--muted);
}
.foot a { color: var(--muted); }
.foot a:hover { color: var(--scan); }

[hidden] { display: none !important; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.vis { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .stamp.in { animation: none; }
}

/* ---------- Druck: nur der Bericht ---------- */
@media print {
  body { background: #fff; }
  .top, .hero, .chips, .info, .foot, .actions, .jobbox { display: none !important; }
  .report { box-shadow: none; border: 1px solid #000; }
  .stage { margin: 0; }
}
