/* Trash Scan – gemeinsames Stylesheet (Start, Desktop, Mobil) */

:root {
  --ink: #0f2a2e;
  --ink-soft: #3d5559;
  --paper: #e8eeea;
  --card: #f6f8f5;
  --line: rgba(15, 42, 46, 0.14);

  --pet: #2b6be0;
  --glas: #1e8a57;
  --alu: #8fa3ab;
  --karton: #d8921b;
  --sonder: #d2412f;

  --f-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 18px;
  --gutter: clamp(20px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.55;
}

h1, h2, h3, p { margin: 0; }

[hidden] { display: none !important; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--pet);
  outline-offset: 3px;
  border-radius: 6px;
}

.mono {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wrap {
  width: min(1180px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* ---------- Kopfzeile ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark { display: inline-flex; gap: 3px; }
.brand-mark i { display: block; width: 7px; height: 22px; border-radius: 2px; }
.brand-mark i:nth-child(1) { background: var(--pet); }
.brand-mark i:nth-child(2) { background: var(--glas); }
.brand-mark i:nth-child(3) { background: var(--karton); }
.brand-mark i:nth-child(4) { background: var(--alu); }

.top-link {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
}

/* ---------- Hero ---------- */

.hero { padding-block: clamp(28px, 6vw, 72px) clamp(40px, 7vw, 96px); }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.hero-grid > * { min-width: 0; }

.eyebrow { color: var(--ink-soft); margin-bottom: 18px; }

.hero h1 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 13vw, 7.4rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
}

.hero h1 .dot { color: var(--glas); }

.lead {
  margin-top: 26px;
  max-width: 34ch;
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  line-height: 1.45;
  color: var(--ink-soft);
}

.hero-cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 700 1rem/1 var(--f-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.is-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }

/* ---------- Scanner (Signature) ---------- */

.scanner {
  background: var(--card);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(16px, 3vw, 26px);
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -28px rgba(15, 42, 46, 0.45);
}

.scanner-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.scanner-head h2 { font-family: var(--f-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.scanner-head span { color: var(--ink-soft); }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin-inline: -2px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 600 0.95rem/1 var(--f-body);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.chip svg { width: 20px; height: 20px; fill: currentColor; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.finder {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(170px, 26vw, 210px);
  margin-top: 4px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}

.finder::before {
  /* Eckmarken des Suchers */
  content: "";
  position: absolute;
  inset: 16px;
  background:
    linear-gradient(var(--paper), var(--paper)) top left / 22px 3px no-repeat,
    linear-gradient(var(--paper), var(--paper)) top left / 3px 22px no-repeat,
    linear-gradient(var(--paper), var(--paper)) top right / 22px 3px no-repeat,
    linear-gradient(var(--paper), var(--paper)) top right / 3px 22px no-repeat,
    linear-gradient(var(--paper), var(--paper)) bottom left / 22px 3px no-repeat,
    linear-gradient(var(--paper), var(--paper)) bottom left / 3px 22px no-repeat,
    linear-gradient(var(--paper), var(--paper)) bottom right / 22px 3px no-repeat,
    linear-gradient(var(--paper), var(--paper)) bottom right / 3px 22px no-repeat;
  opacity: 0.8;
  pointer-events: none;
}

.finder-item { width: 84px; height: 84px; fill: currentColor; transition: opacity 0.2s ease; }
.finder-hint { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; opacity: 0.75; }

.finder.is-scanning .finder-item { opacity: 0.55; }
.finder.is-scanning::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  height: 3px;
  top: 16px;
  background: var(--glas);
  box-shadow: 0 0 18px 4px rgba(30, 138, 87, 0.7);
  animation: sweep 0.9s ease-in-out;
}

@keyframes sweep {
  from { top: 16px; }
  to { top: calc(100% - 19px); }
}

.result { margin-top: 18px; }

.result-empty { color: var(--ink-soft); padding: 8px 2px 4px; }

.result-title { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; flex: 0 0 auto; }
.result-title h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; }

.facts { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.fact { padding: 12px 0; border-top: 1px solid var(--line); }
.fact dt { color: var(--ink-soft); margin-bottom: 3px; }
.fact dd { margin: 0; font-weight: 500; }

.meter { margin-top: 8px; height: 10px; border-radius: 999px; background: var(--paper); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--glas); transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }

.result.is-in { animation: rise 0.35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.note { margin-top: 14px; color: var(--ink-soft); font-size: 0.85rem; }

/* Tonnen */

.bins { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 22px; align-items: end; }

.bin {
  position: relative;
  height: 74px;
  border-radius: 6px 6px 12px 12px;
  background: color-mix(in srgb, var(--c) 22%, var(--card));
  display: grid;
  place-items: end center;
  padding-bottom: 8px;
  transition: background 0.25s ease, transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.bin::before {
  content: "";
  position: absolute;
  top: -6px;
  left: -3px;
  right: -3px;
  height: 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--c) 55%, var(--card));
  transition: background 0.25s ease;
}
.bin span { font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); opacity: 0.75; }
.bin svg { position: absolute; top: 14px; width: 26px; height: 26px; fill: var(--paper); opacity: 0; }

.bin.is-hit { background: var(--c); transform: translateY(-6px); }
.bin.is-hit::before { background: var(--ink); }
.bin.is-hit span { color: #fff; opacity: 1; }
.bin.is-hit svg { animation: drop 0.55s 0.1s cubic-bezier(0.5, 0, 0.9, 0.5) both; }

@keyframes drop {
  0% { opacity: 1; transform: translateY(-110px); }
  80% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0); }
}

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

.section { padding-block: clamp(48px, 8vw, 104px); border-top: 1px solid var(--line); }

.section-head { max-width: 40ch; margin-bottom: clamp(28px, 5vw, 56px); }
.section-head .eyebrow { margin-bottom: 12px; }
.section h2 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.035em;
}
.section-head p { margin-top: 16px; color: var(--ink-soft); }


/* Karte */

.map-card { background: var(--card); border-radius: calc(var(--radius) + 6px); overflow: hidden; }
.map-card svg { display: block; width: 100%; height: auto; }
.map-cap { padding: 16px 22px 20px; color: var(--ink-soft); font-size: 0.92rem; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }

.pin-pulse { animation: pulse 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(3); opacity: 0; } }

/* Fuss */

.foot { padding-block: 40px 56px; border-top: 1px solid var(--line); color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 0.92rem; }

/* ---------- Desktop-Version ---------- */

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
  .facts { grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .fact.is-wide { grid-column: 1 / -1; }
  .map-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: center; }
  .map-grid .section-head { margin-bottom: 0; }
}

/* ---------- Mobil-Version ---------- */

.is-mobile { font-size: 1rem; }
.is-mobile .hero h1 { font-size: clamp(3.4rem, 22vw, 5.6rem); }
.is-mobile .section { padding-block: 44px; }
.is-mobile .bin { height: 62px; }
.is-mobile .bin span { font-size: 0.58rem; }
.is-mobile .foot { padding-bottom: 96px; }

.dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 12px 30px -10px rgba(15, 42, 46, 0.6);
}
.dock a {
  display: grid;
  place-items: center;
  min-height: 46px;
  border-radius: 999px;
  color: var(--paper);
  text-decoration: none;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dock a:active { background: rgba(255, 255, 255, 0.14); }

/* Mobil-Layout bleibt einspaltig, auch wenn die Datei auf einem breiten Bildschirm geöffnet wird */
.is-mobile .wrap { width: min(520px, 100% - 40px); }
.is-mobile .hero-grid,
.is-mobile .facts,
.is-mobile .map-grid { grid-template-columns: 1fr; display: grid; gap: 16px; }
.is-mobile .facts { gap: 0; }
.is-mobile .fact.is-wide { grid-column: auto; }
.is-mobile .map-grid .section-head { margin-bottom: 20px; }

html { scroll-behavior: smooth; }

/* ---------- Start-Abfrage ---------- */

.gate-body { background: var(--ink); color: var(--paper); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.gate-body .brand { color: var(--paper); }
.gate-body :focus-visible { outline-color: var(--paper); }

.gate { flex: 1; display: grid; align-content: center; padding-block: 24px 56px; }

.gate h1 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 9vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  max-width: 14ch;
}
.gate-sub { margin-top: 18px; color: rgba(232, 238, 234, 0.7); max-width: 40ch; }

.choices { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: clamp(28px, 5vw, 48px); }

.choice {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border: 0;
  border-radius: calc(var(--radius) + 4px);
  background: var(--card);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
}
.choice::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--c); }
.choice:hover { transform: translateY(-4px); }
.choice svg { flex: 0 0 auto; width: 56px; height: 56px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.choice b { display: block; font-family: var(--f-display); font-weight: 800; font-size: 1.9rem; letter-spacing: -0.03em; line-height: 1; }
.choice small { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 0.95rem; }
.choice.c-mobile { --c: var(--karton); }
.choice.c-desktop { --c: var(--pet); }

.qr-panel { display: none; margin-top: clamp(24px, 4vw, 40px); }
.qr-panel.is-open { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
.choices.is-hidden { display: none; }

.qr-box {
  justify-self: start;
  width: min(280px, 100%);
  aspect-ratio: 1;
  padding: 18px;
  border-radius: calc(var(--radius) + 4px);
  background: #fff;
}
.qr-box svg { display: block; width: 100%; height: 100%; }
.qr-box img { display: block; width: 244px; max-width: 100%; height: auto; }

.qr-text h2 { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -0.03em; line-height: 1.05; }
.qr-text p { margin-top: 12px; color: rgba(232, 238, 234, 0.75); max-width: 44ch; }

.url-row { margin-top: 18px; display: grid; gap: 6px; }
.url-row label { color: rgba(232, 238, 234, 0.6); }
.url-row input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1.5px solid rgba(232, 238, 234, 0.3);
  border-radius: 12px;
  background: transparent;
  color: var(--paper);
  font: 0.9rem/1 var(--f-mono);
}

.warn { display: none; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(216, 146, 27, 0.18); color: #f3d79b; font-size: 0.92rem; }
.warn.is-on { display: block; }

.qr-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; }
.gate-body .btn { background: var(--paper); color: var(--ink); }
.gate-body .btn.is-ghost { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 2px var(--paper); }

@media (min-width: 760px) {
  .choices { grid-template-columns: 1fr 1fr; }
  .choice { flex-direction: column; align-items: flex-start; min-height: 260px; justify-content: space-between; padding: 30px; }
  .choice svg { width: 84px; height: 84px; }
  .qr-panel.is-open { grid-template-columns: auto 1fr; gap: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* KI-Scanner (scanner.html) */
.cam { padding-block: 8px 40px; }
.cam-title { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.8rem, 7vw, 2.6rem); letter-spacing: -0.03em; line-height: 1.05; }
.cam-view { position: relative; margin-top: 20px; width: min(100%, 520px); aspect-ratio: 1; border-radius: calc(var(--radius) + 4px); overflow: hidden; background: var(--ink); }
.cam-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-view video.is-mirrored { transform: scaleX(-1); }
.cam-corner { position: absolute; inset: 14px; border: 2px solid rgba(232, 238, 234, 0.55); border-radius: 12px; pointer-events: none; }
.cam-overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; background: var(--ink); color: var(--paper); }
.cam-overlay .btn { background: var(--paper); color: var(--ink); }
.cam-msg { color: rgba(232, 238, 234, 0.75); max-width: 32ch; font-size: 0.95rem; }
.cam-result { margin-top: 20px; width: min(100%, 520px); padding: 20px; border-radius: var(--radius); background: var(--card); }
.cam-result .result-title { margin-bottom: 0; }
.cam-result .result-title h2 { font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.cam-where { margin-top: 6px; color: var(--ink-soft); }
.cam-bars { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.cam-bars li { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 4px 10px; align-items: center; }
.cam-bars li .mono { grid-column: 1 / -1; color: var(--ink-soft); overflow-wrap: anywhere; }
.cam-bars li .meter { margin: 0; }
.cam-bars li .meter i { transition: width .2s; }
.cam-bars li b { font-size: 0.9rem; text-align: right; }
.cam-actions { margin-top: 16px; }
.cam-route { margin-top: 20px; width: min(100%, 520px); padding: 20px; border-radius: var(--radius); background: var(--card); }
.cam-route .eyebrow { margin-bottom: 6px; }
.cam-route h2 { font-family: var(--f-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.15; }
.cam-map { margin-top: 14px; height: 240px; border-radius: 12px; overflow: hidden; background: #dfe8e1; z-index: 0; }
.cam-route-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
