/* Scan-Seite (/scan, /en/scan) — gemeinsame Styles beider Sprachfassungen */
:root {
  --bg: #F9F4EA;
  --dark: #1A0030;
  --text: #6100A2;
  --accent: #CCFF00;
  --accent2: #52FF00;
  --text-light: #9B7DB8;
  --text-muted: #B8A5C8;
}

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

/* Die Glows ragen über den Rand; html + body clippen, sonst wird die Seite auf dem Handy breiter als der Bildschirm */
html { overflow-x: clip; }

body {
  font-family: 'Funnel Sans', 'Helvetica Neue', sans-serif;
  background: var(--dark);
  color: var(--bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  background: rgba(26, 0, 48, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 60px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: 'Funnel Display', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--bg);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-dot {
  width: 10px; height: 10px;
  background: var(--accent);
  display: inline-block;
}
.nav-links {
  display: none;
  gap: 1.6rem;
  align-items: center;
}
@media (min-width: 900px) {
  .nav-links { display: flex; }
}
.nav-links a {
  font-size: 0.85rem;
  color: rgba(249,244,234,0.72);
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--accent); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-lang-mobile {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(249,244,234,0.86);
}
.nav-lang-mobile:hover { color: var(--accent); }
@media (min-width: 900px) { .nav-lang-mobile { display: none; } }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid rgba(249,244,234,0.28);
  color: var(--bg);
  font-family: 'Funnel Sans', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }
@media (min-width: 900px) { .nav-toggle { display: none; } }
.nav-toggle-bars { display: grid; gap: 4px; width: 16px; }
.nav-toggle-bars span { display: block; height: 2px; background: currentColor; }

/* Navigation Drawer */
.Drawer {
  --drawer-width: min(21em, 84dvw, 100dvw - 24px);
  --drawer-backdrop: 0;
  inset: 0; width: auto; height: auto; max-width: none; max-height: none;
  margin: 0; padding: 0; background: transparent; border: 0; overflow: visible;
}
.Drawer::backdrop { background: #0D001A; opacity: calc(var(--drawer-backdrop) * 0.72); }
.Drawer-scroller {
  position: relative; display: grid;
  grid-template-columns: var(--drawer-width) 100%;
  overflow-x: scroll; overscroll-behavior: none; scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.Drawer-scroller::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .Drawer-scroller { scroll-behavior: smooth; }
}
.Drawer-scroller::after { content: ''; scroll-snap-align: end; scroll-initial-target: nearest; }
.Drawer-sheet {
  display: grid; grid-template-rows: auto 1fr auto; gap: 20px;
  height: 100svh; background: var(--dark); color: var(--bg);
  border-inline-end: 1px solid rgba(249,244,234,0.14);
  padding: 18px 20px 28px; overflow-y: auto; scroll-snap-align: start; scrollbar-width: none;
}
.Drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 14px; border-bottom: 1px solid rgba(249,244,234,0.14);
}
.Drawer-close {
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid rgba(249,244,234,0.28); color: var(--bg);
  font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.Drawer-close:hover { border-color: var(--accent); color: var(--accent); }
.Drawer-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.Drawer-list a {
  display: flex; align-items: center; min-height: 48px; padding: 10px 12px;
  font-family: 'Funnel Display', sans-serif; font-size: 1.08rem; font-weight: 700;
  color: var(--bg); border-inline-start: 3px solid transparent;
}
.Drawer-list a:hover, .Drawer-list a[aria-current="page"] {
  color: var(--accent); border-inline-start-color: var(--accent); background: rgba(204,255,0,0.06);
}
.Drawer-foot { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid rgba(249,244,234,0.14); }
.Drawer-lang {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  font-size: 0.88rem; color: rgba(249,244,234,0.72); text-decoration: underline; text-underline-offset: 3px;
}
@supports (animation-timeline: scroll()) {
  .Drawer { timeline-scope: --drawer-fade; animation: fade-drawer-backdrop linear both; animation-timeline: --drawer-fade; }
  .Drawer-scroller { scroll-timeline: --drawer-fade x; }
  @property --drawer-backdrop { syntax: '<number>'; inherits: true; initial-value: 0; }
  @keyframes fade-drawer-backdrop { 0% { --drawer-backdrop: 1 } 100% { --drawer-backdrop: 0 } }
}

/* Glows */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
}
.glow-1 { width: 600px; height: 600px; background: var(--accent); right: -200px; top: -200px; }
.glow-2 { width: 400px; height: 400px; background: var(--accent2); left: -100px; bottom: -100px; }

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 60px);
  position: relative;
  z-index: 1;
}

/* SCAN SECTION */
.scan-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 24px 60px;
  position: relative;
}

.scan-tag {
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(249,244,234,0.4);
  margin-bottom: 1.5rem;
}

.scan-hero h1 {
  font-family: 'Funnel Display', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.1;
  color: var(--bg);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.scan-hero h1 .accent { color: var(--accent); }

.scan-hero p {
  font-weight: 300;
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(249,244,234,0.6);
  max-width: 50ch;
  margin-bottom: 2.5rem;
}

/* INPUT FORM */
.scan-form {
  display: flex;
  gap: 0;
  width: 100%;
  max-width: 560px;
}
.scan-input {
  flex: 1;
  padding: 16px 20px;
  font-family: 'Funnel Sans', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  background: rgba(249,244,234,0.08);
  border: 1px solid rgba(249,244,234,0.15);
  border-right: none;
  color: var(--bg);
  outline: none;
  transition: all 0.2s;
}
.scan-input:focus {
  background: rgba(249,244,234,0.12);
  border-color: var(--accent);
}
.scan-input::placeholder {
  color: rgba(249,244,234,0.3);
}
.scan-btn {
  padding: 16px 32px;
  font-family: 'Funnel Sans', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: var(--dark);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.scan-btn:hover {
  background: var(--accent2);
}
.scan-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.scan-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: rgba(249,244,234,0.3);
}

/* SCANNING STATE */
.scan-progress {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 560px;
}
.scan-progress.active { display: flex; }

.progress-ring-container {
  position: relative;
  width: 160px;
  height: 160px;
}
.progress-ring {
  transform: rotate(-90deg);
}
.progress-ring-bg {
  fill: none;
  stroke: rgba(249,244,234,0.08);
  stroke-width: 6;
}
.progress-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: square;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset 0.3s ease;
}
.progress-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.progress-text .pct {
  font-family: 'Funnel Display', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: var(--accent);
}
.progress-text .pct-label {
  font-size: 0.75rem;
  color: rgba(249,244,234,0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.progress-status {
  font-size: 0.9rem;
  color: rgba(249,244,234,0.5);
  text-align: center;
}
.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 340px;
}
.progress-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: rgba(249,244,234,0.3);
  transition: color 0.3s;
}
.progress-step.active {
  color: rgba(249,244,234,0.7);
}
.progress-step.done {
  color: var(--accent);
}
.step-dot {
  width: 8px; height: 8px;
  background: rgba(249,244,234,0.15);
  flex-shrink: 0;
  transition: background 0.3s;
}
.progress-step.active .step-dot {
  background: rgba(249,244,234,0.5);
  animation: pulse-dot 1s infinite;
}
.progress-step.done .step-dot {
  background: var(--accent);
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* RESULTS */
.scan-results {
  display: none;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px;
}
.scan-results.active { display: block; }

.result-header {
  text-align: center;
  margin-bottom: 3rem;
}
.result-url {
  font-size: 0.8rem;
  color: rgba(249,244,234,0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  word-break: break-all;
}
.result-score-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 1.5rem;
}
.score-ring {
  transform: rotate(-90deg);
}
.score-ring-bg {
  fill: none;
  stroke: rgba(249,244,234,0.06);
  stroke-width: 8;
}
.score-ring-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: square;
  stroke-dasharray: 565;
  stroke-dashoffset: 565;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.score-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.score-number {
  font-family: 'Funnel Display', sans-serif;
  font-weight: 800;
  font-size: 3.5rem;
  line-height: 1;
}
.score-grade {
  font-family: 'Funnel Display', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin-top: 0.25rem;
}
.score-label {
  font-size: 0.75rem;
  color: rgba(249,244,234,0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.5rem;
}

/* Grade colors */
.grade-a { color: #52FF00; }
.grade-b { color: var(--accent); }
.grade-c { color: #FFD700; }
.grade-d { color: #FF8C00; }
.grade-f { color: #FF4444; }
.stroke-a { stroke: #52FF00; }
.stroke-b { stroke: var(--accent); }
.stroke-c { stroke: #FFD700; }
.stroke-d { stroke: #FF8C00; }
.stroke-f { stroke: #FF4444; }

/* Category Bars */
.categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.category-card {
  padding: 1.25rem;
  background: rgba(249,244,234,0.04);
  border: 1px solid rgba(249,244,234,0.08);
}
.category-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(249,244,234,0.5);
  margin-bottom: 0.5rem;
}
.category-score-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}
.category-score {
  font-family: 'Funnel Display', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
}
.category-max {
  font-size: 0.8rem;
  color: rgba(249,244,234,0.3);
}
.category-bar {
  width: 100%;
  height: 4px;
  background: rgba(249,244,234,0.08);
  overflow: hidden;
}
.category-bar-fill {
  height: 100%;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

/* Issues */
.issues-section {
  margin-bottom: 3rem;
}
.issues-title {
  font-family: 'Funnel Display', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--bg);
  margin-bottom: 1rem;
}
.issue-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(249,244,234,0.06);
}
.issue-icon {
  width: 24px; height: 24px;
  background: rgba(255,68,68,0.15);
  color: #FF4444;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.issue-body {
  display: grid;
  gap: 0.25rem;
}
.issue-text {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--bg);
  line-height: 1.4;
}
.issue-detail {
  font-size: 0.88rem;
  color: rgba(249,244,234,0.68);
  line-height: 1.5;
}

/* Quick Report Email Capture */
.report-capture {
  padding: 1.75rem;
  border: 1px solid rgba(249,244,234,0.16);
  background: rgba(249,244,234,0.04);
  margin-bottom: 1.5rem;
  text-align: left;
}
.report-capture h3 {
  font-family: 'Funnel Display', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--bg);
  margin-bottom: 0.4rem;
}
.report-capture p {
  font-size: 0.9rem;
  color: rgba(249,244,234,0.72);
  line-height: 1.5;
  margin-bottom: 1rem;
}
.report-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: stretch;
}
.report-input {
  flex: 1 1 240px;
  min-height: 48px;
  padding: 12px 15px;
  font-family: 'Funnel Sans', sans-serif;
  font-size: max(1rem, 1em);
  background: rgba(249,244,234,0.08);
  border: 1px solid rgba(249,244,234,0.22);
  color: var(--bg);
}
.report-input::placeholder { color: rgba(249,244,234,0.45); }
.report-input:is(:user-invalid, .user-invalid-fallback) {
  border-color: #FF6B6B;
  background: rgba(255,68,68,0.08);
}
.report-submit {
  min-height: 48px;
  padding: 12px 22px;
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: 'Funnel Sans', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}
.report-submit:hover { background: var(--accent); color: var(--dark); }
.report-submit:disabled { opacity: 0.55; cursor: not-allowed; }
.field-error-msg {
  display: none;
  flex-basis: 100%;
  color: #FF8C8C;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.25rem;
}
.report-form.has-error .field-error-msg { display: block; }
.report-privacy {
  margin-top: 0.7rem !important;
  margin-bottom: 0 !important;
  font-size: 0.8rem !important;
  color: rgba(249,244,234,0.55) !important;
}
.report-privacy a { color: var(--accent); text-decoration: underline; }
.report-status {
  margin-top: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--accent);
  background: rgba(204,255,0,0.08);
  color: var(--bg);
  font-size: 0.92rem;
  line-height: 1.45;
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}
.cta-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* CTA Section */
.result-cta {
  text-align: center;
  padding: 2.5rem;
  border: 1px solid rgba(204,255,0,0.2);
  background: rgba(204,255,0,0.03);
  margin-bottom: 2rem;
}
.result-cta h3 {
  font-family: 'Funnel Display', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--bg);
  margin-bottom: 0.5rem;
}
.result-cta p {
  font-size: 0.95rem;
  color: rgba(249,244,234,0.6);
  max-width: 45ch;
  margin: 0 auto 1.5rem;
  line-height: 1.5;
}
.cta-btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--accent);
  color: var(--dark);
  font-family: 'Funnel Sans', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.2s;
}
.cta-btn:hover {
  background: var(--accent2);
  transform: translateY(-2px);
}
.cta-pricing {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: rgba(249,244,234,0.35);
}

.scan-again {
  text-align: center;
  margin: 2rem 0 3rem;
}
.scan-again-btn {
  display: inline-block;
  padding: 10px 24px;
  border: 1px solid rgba(249,244,234,0.15);
  color: rgba(249,244,234,0.5);
  font-family: 'Funnel Sans', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  background: none;
  transition: all 0.2s;
}
.scan-again-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ERROR */
.scan-error {
  display: none;
  text-align: center;
  padding: 2rem;
  max-width: 560px;
}
.scan-error.active { display: block; }
.error-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.scan-error .error-msg {
  font-size: 1rem;
  color: rgba(249,244,234,0.6);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* FOOTER */
.footer {
  padding: 40px 0;
  border-top: 1px solid rgba(249,244,234,0.08);
  text-align: center;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 60px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-left {
  font-weight: 300;
  font-size: 0.85rem;
  color: rgba(249,244,234,0.4);
}
.footer-right {
  display: flex;
  gap: 2rem;
}
.footer-right a {
  font-weight: 300;
  font-size: 0.85rem;
  color: rgba(249,244,234,0.5);
  transition: color 0.2s;
}
.footer-right a:hover { color: var(--accent); }

/* Powered badge */
.powered-by {
  text-align: center;
  padding: 1rem 0 2rem;
  font-size: 0.75rem;
  color: rgba(249,244,234,0.25);
}
.powered-by a { color: var(--accent); }

/* Responsive */
@media (max-width: 600px) {
  .scan-form { flex-direction: column; }
  .scan-input { border-right: 1px solid rgba(249,244,234,0.15); border-bottom: none; }
  .categories-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 1rem; }
  .footer-right { flex-wrap: wrap; justify-content: center; gap: 1rem 1.5rem; }
  .report-form { flex-direction: column; }
  .report-submit { width: 100%; }
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* Sprachschalter in der Navigation */
.nav-links .lang { opacity: 0.5; }
.nav-links .lang[aria-current="page"] { opacity: 1; color: var(--bg); }
.nav-links .lang-sep { color: rgba(249,244,234,0.2); }
