/* ══════════════════════════════════════════════════════════════
   WAGO 75 · Celebrating Connections — Prototyp
   CD-Tokens aus dem WAGO Brand Portal. Nicht ändern ohne CD-Check.
   ══════════════════════════════════════════════════════════════ */
:root {
  --green: #6ec800;
  --green-80: #8bd333;
  --ink: #1f2837;
  --ink-2: #28323f;
  --ink-deep: #141b24;
  --n7: #eff0f1;
  --n15: #dedfe1;
  --n40: #a5a8af;
  --n70: #616a73;
  --white: #ffffff;

  --font: 'WAGO Connective', 'Inter', Arial, system-ui, sans-serif;
  --r-card: 18px;
  --r-pill: 28px;
  /* Motion: Personality "Premium" — Signature-Easing fuer 80% aller Bewegungen,
     Entrance = decelerate, Exit = accelerate, kein Overshoot */
  --dur-fast: 150ms;   /* Press/Feedback */
  --dur-med: 350ms;    /* Cards, Sheets, View-Wechsel */
  --dur-slow: 600ms;   /* dramatische Reveals */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-in: cubic-bezier(0.3, 0, 1, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  height: 100dvh;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }
input { font: inherit; }
img { display: block; max-width: 100%; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Views ──────────────────────────────────────────────────── */
.view {
  position: fixed; inset: 0;
  display: none;
  flex-direction: column;
  padding: max(20px, env(safe-area-inset-top)) 24px max(20px, env(safe-area-inset-bottom));
  max-width: 480px; margin: 0 auto;
  opacity: 0; transform: translateY(10px);
}
.view.is-active {
  display: flex;
  animation: viewIn var(--dur-med) var(--ease-out) forwards;
}
@keyframes viewIn { to { opacity: 1; transform: none; } }

.view--light { background: var(--white); color: var(--ink); }
.view--dark { background: var(--ink); }
.view--scroll { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }

/* ── Typo ───────────────────────────────────────────────────── */
.eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--green); /* auf Anthrazit: 7:1 — CD-konform */
}
.view--light .eyebrow { color: var(--ink); } /* CD: kein gruener Text auf Weiss (digital) */
.eyebrow--muted { color: var(--n70); }
.h1 { font-size: clamp(26px, 7.6vw, 34px); font-weight: 700; letter-spacing: -.02em; line-height: 1.12; margin-top: 10px; }
.h1--ink { color: var(--ink); }
.sub { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--n70); }
.sub--light { color: var(--n40); }
.center { text-align: center; }
.gap-top { margin-top: 26px; }
.footnote { font-size: 12.5px; color: var(--n40); margin-top: 14px; line-height: 1.5; }
.view--light .footnote { color: var(--n70); }

.page-head { padding-top: 34px; flex-shrink: 0; }
.page-head--start { text-align: left; }
.wago-logo { width: 84px; height: auto; margin: 0 auto 30px; display: block; }
.page-head--overlay { position: relative; z-index: 3; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  border-radius: var(--r-pill);
  font-weight: 700; font-size: 14.5px;
  padding: 13px 22px;
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--green); color: var(--ink); }
.btn--ghost { border: 1.6px solid currentColor; opacity: .82; }
.view--light .btn--ghost { color: var(--ink); border-color: var(--n15); opacity: 1; }
.btn--big { width: 100%; padding: 17px; font-size: 16.5px; }
.btn--wide { width: 100%; }
.btn--small { padding: 10px 18px; font-size: 13.5px; }
.btn:focus-visible, .menu-item:focus-visible, .skip-link:focus-visible, .back:focus-visible {
  outline: 3px solid var(--green); outline-offset: 3px;
}

/* ── Start / Puzzle ─────────────────────────────────────────── */
.puzzle-wrap { position: relative; margin: 26px auto 0; width: min(100%, 340px); flex-shrink: 0; display: flex; flex-direction: column; }
.puzzle-wrap .countdown { top: auto; height: auto; aspect-ratio: 1; align-self: stretch; }
.puzzle {
  position: relative;
  width: 100%; aspect-ratio: 1;
  background: var(--n7);
  border-radius: var(--r-card);
  padding: 8px;
  touch-action: none;
}
.p-tile {
  position: absolute;
  width: calc((100% - 16px) / 3);
  aspect-ratio: 1;
  background-image: url('../assets/puzzle-source.jpg');
  background-size: 300% 300%;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--n15);
  transition: transform var(--dur-fast) var(--ease);
  will-change: transform;
}
.p-tile.is-hole { background: var(--n15); box-shadow: none; }
.puzzle.is-solved .p-tile { box-shadow: none; border-radius: 0; transition: transform var(--dur-fast) var(--ease), border-radius 400ms; }

.countdown {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .88);
  border-radius: var(--r-card);
  backdrop-filter: blur(3px);
}
.countdown span {
  font-size: 120px; font-weight: 800; color: var(--green);
  animation: pop 1s var(--ease) infinite;
}
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 30% { transform: scale(1.05); opacity: 1; } 85% { transform: scale(1); opacity: 1; } 100% { opacity: 0; } }

.puzzle-hud {
  display: flex; justify-content: space-between; align-items: baseline;
  order: -1; margin-bottom: 18px;  /* Mockup: Timer ueber dem Puzzle */
}
.hud-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--n70); }
.hud-time strong { font-size: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.hud-time em { font-style: normal; color: var(--green); }
.hud-moves { font-size: 14px; color: var(--n70); }

.start-actions { margin-top: auto; padding-top: 22px; padding-bottom: 36px; flex-shrink: 0; }
.hint { text-align: center; margin-top: 12px; font-size: 13px; color: var(--n70); }
.skip-link {
  position: absolute; right: 16px; bottom: max(10px, env(safe-area-inset-bottom));
  font-size: 12.5px; color: var(--n40); text-decoration: underline;
  padding: 14px 16px; min-height: 44px; /* Touch-Target */
}

/* ── Solved / Leaderboard ───────────────────────────────────── */
.solved-head { text-align: center; padding-top: 20px; flex-shrink: 0; }
.solved-emblem { width: 128px; height: auto; margin: 0 auto 44px; animation: settle 480ms var(--ease-out); }
@keyframes settle {
  0% { transform: scale(.86); opacity: 0; }
  55% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.final-time { font-size: 44px; font-weight: 800; color: var(--green); letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }

.name-row { display: flex; gap: 10px; margin-top: 24px; flex-shrink: 0; }
.input {
  flex: 1; min-width: 0;
  background: var(--n7); border: 0; border-radius: var(--r-pill);
  padding: 14px 22px; font-size: 14.5px; color: var(--ink);
}
.input::placeholder { color: var(--n40); }
.input:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.board { margin-top: 26px; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.board-list { list-style: none; overflow-y: auto; margin-top: 12px; flex: 1; min-height: 0; }
.board-row {
  display: grid; grid-template-columns: 34px 1fr auto;
  align-items: center; gap: 6px;
  padding: 10px 8px; border-radius: 14px;
}
.board-row.is-you { background: rgba(110, 200, 0, .13); }
.board-rank { font-size: 17px; font-weight: 800; color: var(--n40); text-align: center; }
.board-row:nth-child(-n+3) .board-rank { color: var(--green); }
.board-name strong { display: block; font-size: 14.5px; color: var(--ink); }
.board-name small { font-size: 11.5px; color: var(--n40); }
.board-time { font-size: 14.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

.view--light .btn--wide { margin-top: 14px; flex-shrink: 0; }

/* ── Menü ───────────────────────────────────────────────────── */
.menu-head { padding-top: 34px; flex-shrink: 0; }
.menu-emblem { width: 88px; height: auto; }
.menu { margin-top: 30px; display: flex; flex-direction: column; }
.menu-item { opacity: 0; transform: translateY(12px); animation: viewIn var(--dur-med) var(--ease-out) forwards; }
.menu-item:nth-child(1) { animation-delay: 40ms; }
.menu-item:nth-child(2) { animation-delay: 70ms; }
.menu-item:nth-child(3) { animation-delay: 100ms; }
.menu-item:nth-child(4) { animation-delay: 130ms; }
.menu-item:nth-child(5) { animation-delay: 160ms; }
.menu-item:nth-child(6) { animation-delay: 190ms; }
.menu-item {
  display: flex; align-items: center; gap: 18px;
  padding: 17px 4px; text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transition: padding-left var(--dur-fast) var(--ease);
}
.menu-item:last-child { border-bottom: 0; }
.menu-item:active { padding-left: 10px; }
.menu-idx { font-size: 13px; font-weight: 700; color: var(--n70); width: 26px; font-variant-numeric: tabular-nums; }
.menu-txt strong { display: block; font-size: clamp(26px, 7.2vw, 32px); font-weight: 700; letter-spacing: -.02em; }
.menu-txt small { display: block; margin-top: 4px; font-size: 13px; color: var(--n40); }
.chev { margin-left: auto; width: 11px; height: 11px; border-right: 2.2px solid var(--n70); border-top: 2.2px solid var(--n70); transform: rotate(45deg); flex-shrink: 0; }

/* ── Back ───────────────────────────────────────────────────── */
.back {
  position: relative; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(11, 15, 20, .5); margin-bottom: 14px; flex-shrink: 0;
}
.view--light .back { background: var(--n7); }
.back::before {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 11px; height: 11px;
  border-left: 2.4px solid currentColor; border-bottom: 2.4px solid currentColor;
  /* -42% statt -50% horizontal: optischer Ausgleich, weil die Chevron-Spitze links liegt */
  transform: translate(-42%, -50%) rotate(45deg);
}
.back--float { position: absolute; top: max(20px, env(safe-area-inset-top)); left: 24px; z-index: 5; }

/* ── Karte ──────────────────────────────────────────────────── */
#view-map { padding-left: 0; padding-right: 0; }
#view-map .page-head, #view-map .map-foot { padding-left: 24px; padding-right: 24px; }
.map-stage { position: relative; flex: 1; min-height: 0; margin-top: 6px; }
#map-canvas { width: 100%; height: 100%; display: block; }
.map-year {
  position: absolute; right: 20px; top: 8px;
  font-size: 30px; font-weight: 800; color: rgba(255, 255, 255, .28);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  pointer-events: none;
}
.map-foot { flex-shrink: 0; padding-bottom: 6px; display: flex; flex-direction: column; gap: 12px; }
.legend-bar { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #3a4553, #4e7a2a 55%, var(--green)); }
.legend-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--n40); }
.legend-old { color: var(--green); font-weight: 700; }
#btn-replay { align-self: flex-start; }

.sheet {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 6;
  background: var(--ink-2); border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 24px; padding: 14px 20px 20px;
  animation: sheetUp var(--dur-med) var(--ease);
}
@keyframes sheetUp { from { transform: translateY(30px); opacity: 0; } }
.sheet { animation-timing-function: var(--ease-out); }
.sheet-grab { width: 44px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .22); margin: 0 auto 14px; }
.sheet-body { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.sheet-txt h3 { font-size: 19px; }
.sheet-meta { color: var(--green); font-size: 13.5px; font-weight: 600; margin-top: 4px; }

/* ── generierte Duotone-Kacheln (Platzhalter für Fotos) ─────── */
.tile { border-radius: 16px; background: var(--ink-deep); overflow: hidden; position: relative; }
.tile--avatar { width: 84px; height: 84px; border-radius: 16px; flex-shrink: 0; }
.tile--hero { position: absolute; inset: 0; border-radius: 0; }
.tile--voice { width: 100%; aspect-ratio: 4 / 3; border-radius: 20px; }
.tile canvas { width: 100%; height: 100%; display: block; }

/* ── Standort ───────────────────────────────────────────────── */
#view-site { padding: 0; }
.site-hero { position: relative; height: 46%; flex-shrink: 0; }
.site-hero-fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(31, 40, 55, .1) 30%, var(--ink) 100%); }
.site-content { padding: 0 24px max(20px, env(safe-area-inset-bottom)); margin-top: -20px; position: relative; z-index: 2; }
.chip-row { display: flex; gap: 12px; margin-top: 20px; }
.avatar-row { display: flex; gap: 16px; margin-top: 14px; }
.avatar-row .tile--avatar { width: 78px; height: 78px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .22); }

/* ── Chronic ────────────────────────────────────────────────── */
.timeline { position: relative; margin: 26px 0 30px 10px; padding-left: 36px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2.5px; background: var(--green); opacity: .4; }
.tl-item { position: relative; padding-bottom: 34px; opacity: 0; transform: translateY(14px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.tl-item.is-in { opacity: 1; transform: none; }
.tl-item::before { content: ''; position: absolute; left: -36px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--ink); border: 2.5px solid var(--green); }
.tl-item::after { content: ''; position: absolute; left: -31.5px; top: 7.5px; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.tl-year { font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.tl-title { font-size: 16px; font-weight: 700; margin-top: 6px; }
.tl-text { font-size: 15px; color: var(--n40); margin-top: 4px; line-height: 1.5; }

/* ── Voices ─────────────────────────────────────────────────── */
.ticks { display: flex; gap: 5px; margin-top: 14px; }
.tick { width: 9px; height: 4px; border-radius: 2px; background: #3a4553; }
.tick.is-on { background: var(--green); }
.voice-card { margin-top: 18px; flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.quote-mark { font-size: 48px; font-weight: 800; color: var(--ink); line-height: .6; margin-top: 22px; }
.quote-accent { display: block; width: 42px; height: 5px; background: var(--green); border-radius: 3px; margin-top: 14px; } /* Gruen als Flaeche statt Text */
.quote { font-size: clamp(19px, 5.6vw, 24px); font-weight: 600; letter-spacing: -.015em; line-height: 1.4; margin-top: 12px; }
.voice-meta { margin-top: auto; padding-top: 18px; }
.voice-meta .rule { display: block; width: 52px; height: 3px; border-radius: 1.5px; background: var(--green); margin-bottom: 12px; }
.voice-meta strong { display: block; font-size: 15px; }
.voice-meta small { color: var(--n40); font-size: 13.5px; }
.voice-nav { display: flex; justify-content: space-between; gap: 12px; padding-top: 16px; flex-shrink: 0; }
.voice-card.slide-out { animation: vOut var(--dur-fast) var(--ease-in) forwards; }
.voice-card.slide-in { animation: vIn var(--dur-med) var(--ease-out); }
@keyframes vOut { to { opacity: 0; transform: translateX(-26px); } }
@keyframes vIn { from { opacity: 0; transform: translateX(26px); } }

/* ── Fotorückblick ──────────────────────────────────────────── */
.search { position: relative; margin-top: 18px; }
.search-ico { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 13px; height: 13px; border: 2px solid var(--ink); border-radius: 50%; }
.search-ico::after { content: ''; position: absolute; left: 11px; top: 11px; width: 7px; height: 2px; background: var(--ink); transform: rotate(45deg); border-radius: 1px; }
.input--dark { width: 100%; background: var(--ink-2); color: var(--white); padding-left: 46px; border: 1px solid rgba(255, 255, 255, .1); }
.input--dark::placeholder { color: var(--n70); }
.masonry { columns: 2; column-gap: 12px; margin-top: 20px; }
.m-tile { break-inside: avoid; margin-bottom: 12px; border-radius: 16px; overflow: hidden; position: relative; opacity: 0; transform: scale(.96); transition: opacity var(--dur-med) var(--ease), transform var(--dur-med) var(--ease); }
.m-tile.is-in { opacity: 1; transform: none; }
.m-tile.is-you { outline: 3px solid var(--green); outline-offset: -3px; }
.m-tag { position: absolute; left: 10px; bottom: 10px; background: var(--green); color: var(--ink); font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 13px; }
.m-loc { position: absolute; right: 10px; top: 10px; background: rgba(11,15,20,.55); color: var(--white); font-size: 10.5px; font-weight: 600; padding: 4px 9px; border-radius: 10px; letter-spacing: .04em; }

/* ── PDF ────────────────────────────────────────────────────── */
.pdf-pages { display: flex; gap: 14px; margin-top: 34px; padding: 0 8px; }
.pdf-page { flex: 1; aspect-ratio: 3 / 4; background: var(--white); border-radius: 8px; position: relative; transform: rotate(-2deg); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.pdf-page:nth-child(2) { transform: rotate(1deg) translateY(-8px); }
.pdf-page:nth-child(3) { transform: rotate(3deg); }
.pdf-page::before { content: ''; position: absolute; inset: 12% 14% auto; height: 34%; background: var(--n7); border-radius: 4px; }
.pdf-page::after { content: ''; position: absolute; inset: auto 14% 14%; height: 8%; background: var(--green); border-radius: 3px; }

/* ── Reduced Motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

#view-start.is-playing .page-head { display: none; }
#view-start.is-playing .puzzle-wrap { margin-top: 40px; }

/* ── Nachtrag: Start-Button kompakter, Smiley, Zoom, Site-Intro, Chronic-Slides ── */
.btn--start { display: block; margin: 0 auto; padding: 14px 44px; font-size: 15.5px; }
.skip-link { display: inline-flex; align-items: center; gap: 7px; }
.smiley { width: 17px; height: 17px; flex-shrink: 0; }


.site-intro { margin-top: 14px; font-size: 14.5px; line-height: 1.6; color: var(--n40); max-width: 42ch; }

.tl-slides { position: relative; margin-top: 12px; width: 100%; aspect-ratio: 16 / 8.5; border-radius: 14px; overflow: hidden; background: var(--ink-deep); }
.tl-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 900ms var(--ease); }
.tl-slide.is-on { opacity: 1; }
.tl-dots { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 5px; z-index: 2; }
.tl-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .35); transition: background var(--dur-fast); }
.tl-dot.is-on { background: var(--green); }
.tl-slide canvas { width: 100%; height: 100%; display: block; }


.gesture-hint {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; color: var(--n40);
}
.gesture-hint svg { width: 22px; height: 22px; flex-shrink: 0; color: rgba(255,255,255,.8); } /* auf dunkler Karte hell statt gruen */

/* ── Ø-Zeit + Highscore-Raum ── */
.avg-line { text-align: center; margin-top: 16px; font-size: 13px; color: var(--n70); flex-shrink: 0; }
.avg-line strong { color: var(--ink); font-variant-numeric: tabular-nums; }
#view-start.is-playing .avg-line { display: none; }
.avg-strong { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

.board-list--dark { margin-top: 22px; overflow: visible; flex: 0 0 auto; }
.board-list--dark .board-row.is-you { background: rgba(110, 200, 0, .16); }
.board-list--dark .board-name strong { color: var(--white); }
.board-list--dark .board-name small { color: var(--n40); }
.board-list--dark .board-time { color: var(--white); }
.board-list--dark .board-rank { color: var(--n70); }
.board-list--dark .board-row:nth-child(-n+3) .board-rank { color: var(--green); }
.score-cta { margin-top: 18px; padding-bottom: 26px; }
.score-cta .footnote { margin-bottom: 12px; }

/* ── Solve-Moment ── */
.p-tile.is-hole.is-filled {
  /* WICHTIG: kein transform in den Keyframes — das wuerde das translate
     der Kachelposition ueberschreiben und sie nach oben links springen lassen */
  animation: fillInk 520ms var(--ease-out) forwards;
}
@keyframes fillInk {
  0%   { background-color: var(--n15); box-shadow: 0 0 0 0 rgba(110, 200, 0, .55); }
  60%  { background-color: var(--ink); box-shadow: 0 0 0 12px rgba(110, 200, 0, 0); }
  100% { background-color: var(--ink); box-shadow: 0 0 0 0 rgba(110, 200, 0, 0); }
}

/* Folge-Screen blendet von oben nach unten ein */
.view.is-active.wipe-in { animation: wipeDown 560ms var(--ease-out) forwards; }
@keyframes wipeDown {
  from { clip-path: inset(0 0 100% 0); opacity: 1; transform: none; }
  to   { clip-path: inset(0 0 0% 0);  opacity: 1; transform: none; }
}

/* ── Sprach-Umschalter ── */
.lang-toggle {
  position: fixed; top: max(14px, env(safe-area-inset-top)); right: 16px; z-index: 60;
  display: flex; gap: 2px; padding: 3px;
  background: rgba(20, 27, 36, .58); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px; backdrop-filter: blur(6px);
}
.lang-toggle button {
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  color: rgba(255, 255, 255, .85);
  padding: 9px 13px; border-radius: 999px; min-height: 0;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.lang-toggle button.is-on { background: var(--green); color: var(--ink); }

/* ── WAGO Connective (Hausschrift): woff2-Dateien kommen von WAGO
   (design-marketing@wago.com / Christopher, Teams-Ordner). Bis dahin
   greift Inter als Brücke, danach diesen Block aktivieren: ──
@font-face { font-family: 'WAGO Connective'; src: url('../assets/fonts/WAGOConnective-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'WAGO Connective'; src: url('../assets/fonts/WAGOConnective-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'WAGO Connective'; src: url('../assets/fonts/WAGOConnective-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
*/

/* ══════════════ V2: Feedback-Runde WAGO (Weiß als Main) ══════════════ */
.view--light { color: var(--ink); }
.view--light .h1 { color: var(--ink); }
.view--light .sub { color: var(--n70); }
.view--light .sub--light { color: var(--n70); }

.wago-logo--left { margin: 0 0 26px; width: 74px; }
.wago-logo--corner { width: 62px; margin: 0 0 16px; }

/* Menü hell */
.view--light .menu-item { border-bottom: 1px solid var(--n15); }
.view--light .menu-txt small { color: var(--n70); }
.view--light .chev { border-color: var(--ink); opacity: .8; }
.legal-link { margin: 14px 0 28px; padding: 10px 0; font-size: 12.5px; color: var(--n70); text-decoration: underline; align-self: flex-start; }

/* Chronic hell */
.view--light .tl-text { color: var(--n70); }
.view--light .tl-item::before { background: var(--white); }
.view--light .timeline::before { opacity: .55; }

/* Voices hell + Zitat als Held */
.view--light .tick { background: var(--n15); }
.voice-card .quote { font-size: clamp(24px, 7.4vw, 31px); line-height: 1.32; margin-top: 10px; }
.quote-mark { margin-top: 26px; }
.voice-sig { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 20px; }
.voice-ava { width: 58px; height: 58px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 1.5px solid var(--n15); }
.voice-ava canvas { width: 100%; height: 100%; display: block; }
.voice-sig .rule { display: none; }
.view--light .voice-meta small { color: var(--n70); }

/* Suche & Board hell */
.view--light .input--dark { background: var(--n7); color: var(--ink); border: 1px solid var(--n15); }
.view--light .input--dark::placeholder { color: var(--n40); }
.view--light .board-name strong { color: var(--ink); }
.view--light .board-time { color: var(--ink); }

/* Standort hell */
.view--light .site-hero-fade { background: linear-gradient(180deg, rgba(255,255,255,0) 30%, var(--white) 100%); }
.view--light .site-intro { color: var(--n70); }
.view--light .avatar-row .tile--avatar { border-color: var(--n15); }

/* PDF hell */
.view--light .pdf-page { border: 1px solid var(--n15); box-shadow: 0 14px 34px rgba(31, 40, 55, .16); }

/* Gästebuch */
.guest-form { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; flex-shrink: 0; }
.input--area { border-radius: 20px; min-height: 96px; padding: 15px 22px; resize: none; font-family: inherit; }
.guest-wall { display: flex; flex-direction: column; gap: 12px; margin: 26px 0 30px; }
.guest-card { background: var(--n7); border-radius: 18px; padding: 16px 18px; opacity: 0; transform: translateY(10px); animation: viewIn var(--dur-med) var(--ease-out) forwards; }
.guest-card p { font-size: 15px; line-height: 1.5; }
.guest-card small { display: block; margin-top: 8px; font-size: 12px; color: var(--n70); }
.guest-card.is-pending { border: 1.5px dashed var(--n15); background: var(--white); }
.guest-badge { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 9px; background: var(--n15); color: var(--n70); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }

/* Impressum */
.legal-body { padding: 6px 0 34px; }
.legal-body h3 { font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--n70); margin: 24px 0 7px; }
.legal-body p { font-size: 15px; line-height: 1.55; }
.legal-body .todo { color: var(--n70); font-size: 13px; }

/* Karte: Zeitleiste mit Slider + Standort-Pulldown */
.year-ctl { display: flex; flex-direction: column; gap: 6px; }
.year-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; }
.year-slider::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: #3a4553; }
.year-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--green); border: 3px solid var(--ink); margin-top: -10px; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.year-slider::-moz-range-track { height: 6px; border-radius: 3px; background: #3a4553; }
.year-slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--green); border: 3px solid var(--ink); }
.year-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--n40); font-variant-numeric: tabular-nums; }
.site-select-wrap { position: relative; }
.site-select {
  width: 100%; appearance: none; -webkit-appearance: none;
  background: var(--ink-2); color: var(--white);
  border: 1px solid rgba(255,255,255,.14); border-radius: 999px;
  padding: 13px 44px 13px 20px; font: inherit; font-size: 14px;
}
.site-select-wrap::after { content: ''; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--n40); border-bottom: 2px solid var(--n40); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.sheet-extra { display: flex; gap: 18px; margin: 2px 0 14px; }
.sheet-extra div { flex: 1; }
.sheet-extra strong { display: block; font-size: 16px; }
.sheet-extra small { color: var(--n40); font-size: 11.5px; }

/* Foto-Mosaik-Opener */
.mosaic-wrap { margin-top: 20px; flex-shrink: 0; }
.mosaic-wrap canvas { width: 100%; display: block; border-radius: 16px; background: var(--n7); }
.mosaic-cap { margin-top: 10px; font-size: 12.5px; color: var(--n70); text-align: center; }


/* ── Rätsel "Scherben" (SVG) ── */
.shard-stage { position: relative; width: 100%; }
.shard-svg { display: block; width: 100%; height: auto; touch-action: none; overflow: visible; }
.shard-g { cursor: grab; }
.shard-g:active { cursor: grabbing; }
.shard-frame-pulse { animation: framePulse 800ms var(--ease-out) 2; }
@keyframes framePulse { 0% { stroke-opacity: 1; } 55% { stroke-opacity: .35; } 100% { stroke-opacity: 1; } }
.variant-switch { text-align: center; margin-top: 6px; font-size: 12.5px; color: var(--n70); flex-shrink: 0; }
.variant-switch button { color: var(--n70); text-decoration: underline; padding: 6px 4px; font-size: 12.5px; }
.variant-switch button.is-on { color: var(--ink); font-weight: 700; text-decoration: none; }
#view-start.is-playing .variant-switch { display: none; }

/* Drehgriff (Desktop/Einhand): erscheint nach Antippen eines Teils */
.rot-link { stroke: var(--n40); stroke-width: 0.35; stroke-dasharray: 1.4 1.2; pointer-events: none; }
.rot-grip { cursor: grab; }
.rot-grip:active { cursor: grabbing; }
.rot-grip circle { fill: var(--ink); stroke: #ffffff; stroke-width: 0.5; filter: drop-shadow(0 1px 1.5px rgba(31,40,55,.35)); }
.rot-grip path { stroke: #ffffff; }
.shard-g.is-selected polygon { stroke: var(--ink); stroke-opacity: .9; }

.shard-hint { text-align: center; font-size: 12.5px; color: var(--n70); margin-top: 10px; flex-shrink: 0; }


/* ══ V5 — Worldwide hell im Linienstil (Wunsch WAGO, 23.09.2026) ══════════════ */
#view-map { background: var(--white); color: var(--ink); }
.map-stage { overflow: hidden; touch-action: none; perspective: 900px; cursor: grab; margin-top: 2px; }
.map-stage:active { cursor: grabbing; }
.map-tilt { position: absolute; inset: 0; transform-origin: 50% 60%; transition: transform 700ms var(--ease); }
.map--persp .map-tilt { transform: rotateX(38deg) scale(1.28) translateY(-4%); }
#map-svg { width: 100%; height: 100%; display: block; }
#map-svg .map-land { fill: none; stroke: #8e949c; stroke-width: .9; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#map-svg .map-net line { stroke: #c9cdd3; stroke-width: .7; vector-effect: non-scaling-stroke; }
#map-svg .map-net circle { fill: #aeb3ba; }
#map-svg .map-arc { fill: none; stroke: #bcc1c8; stroke-width: .8; vector-effect: non-scaling-stroke; transition: stroke 900ms var(--ease); }
#map-svg .map-arc.is-fresh { stroke: var(--green); stroke-width: 1.4; }
#map-svg .map-site { cursor: pointer; outline: none; }
#map-svg .map-site:focus-visible circle:nth-child(4) { opacity: 1; }
.map--nonet .map-net, .map--noarcs .map-arcs { display: none; }
#view-map .map-year { left: 24px; right: auto; top: auto; bottom: 6px; font-size: 40px; font-weight: 700; color: var(--ink); letter-spacing: -.03em; }

/* Varianten-Schalter */
.map-variants { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 24px 0; position: relative; z-index: 3; }
.seg { display: inline-flex; background: var(--n7); border-radius: 999px; padding: 3px; }
.seg button { font-size: 12.5px; font-weight: 600; color: var(--n70); padding: 0 12px; min-height: 32px; border-radius: 999px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--white); }

/* Fuß hell */
#view-map .year-slider::-webkit-slider-runnable-track { background: var(--n15); }
#view-map .year-slider::-moz-range-track { background: var(--n15); }
#view-map .year-slider::-webkit-slider-thumb { border-color: var(--white); box-shadow: 0 0 0 1.5px var(--ink), 0 2px 6px rgba(31,40,55,.25); }
#view-map .year-labels { color: var(--n70); }
#view-map .site-select { background: var(--white); color: var(--ink); border: 1px solid var(--n15); min-height: 48px; }
#view-map .site-select-wrap::after { border-color: var(--ink); }
.map-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#view-map .gesture-hint { margin: 0; color: var(--n70); font-size: 12.5px; }
#view-map #btn-replay { min-height: 44px; }

/* Standort-Sheet hell */
#view-map .sheet { background: var(--white); border: 1px solid var(--n15); box-shadow: 0 14px 40px rgba(31,40,55,.18); }
#view-map .sheet-grab { background: var(--n15); }
#view-map .sheet-meta { color: var(--ink); font-size: 15px; font-weight: 500; }
#view-map .sheet-extra small { color: var(--n70); }
@media (prefers-reduced-motion: reduce) { .map-tilt, #map-svg .map-arc { transition: none; } }

.sheet { touch-action: none; }
.sheet-close { position: absolute; top: 6px; right: 6px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: var(--n40); }
.sheet-close svg { width: 20px; height: 20px; }
#view-map .sheet-close { color: var(--ink); }
.sheet-close:focus-visible { outline: 2px solid var(--green); outline-offset: -4px; }
.sheet-txt { padding-right: 36px; }
.map-variants { flex-wrap: nowrap; justify-content: space-between; }
.seg button { padding: 0 11px; }


/* ══ V6 — echte Fotos ══════════════════════════════════════════════════ */
.tile:not(.tile--hero) { position: relative; }
.tile .tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile:has(.tile-img) canvas { display: none; }
#view-site .site-hero { height: 44vh; min-height: 260px; }
.site-events { display: flex; flex-direction: column; gap: 26px; margin-top: 12px; }
.ev-card { border-top: 1px solid var(--n15); padding-top: 16px; }
.ev-date { font-size: 12.5px; font-weight: 600; color: var(--n70); letter-spacing: .02em; }
.ev-title { font-size: 19px; line-height: 1.3; margin-top: 4px; }
.ev-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.ev-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; padding: 0; background: var(--n7); }
.ev-thumb--lead { grid-column: span 2; grid-row: span 2; }
.ev-thumb img, .m-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-med) var(--ease); }
.ev-thumb:focus-visible, .m-tile:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
@media (hover: hover) { .ev-thumb:hover img, .m-tile:hover img { transform: scale(1.04); } }
.ev-meta { font-size: 12.5px; color: var(--n70); margin-top: 8px; }
.ev-none { font-size: 15px; line-height: 1.5; color: var(--n70); background: var(--n7); border-radius: 14px; padding: 16px 18px; }
.m-tile { display: block; width: 100%; padding: 0; }
#view-site .site-content { padding-bottom: max(40px, env(safe-area-inset-bottom)); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(14, 19, 26, .96); color: var(--white); display: flex; flex-direction: column; opacity: 0; transition: opacity var(--dur-med) var(--ease); }
.lightbox.is-open { opacity: 1; }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 64px 12px 8px; touch-action: none; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; transition: opacity var(--dur-fast) var(--ease); user-select: none; -webkit-user-drag: none; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); color: var(--white); }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lb-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.lb-close { top: max(12px, env(safe-area-inset-top)); right: 12px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 10px; } .lb-next { right: 10px; }
@media (hover: none) { .lb-prev, .lb-next { display: none; } }
.lb-cap { padding: 12px 20px max(20px, env(safe-area-inset-bottom)); max-width: 640px; width: 100%; margin: 0 auto; }
.lb-title { display: block; font-size: 16px; }
.lb-meta { display: block; font-size: 13px; color: var(--n40); margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .lightbox, .lb-img, .ev-thumb img, .m-tile img { transition: none; } }
.ev-thumb--fill1 { grid-column: span 3; aspect-ratio: 3 / 1; }
.ev-thumb--fill2 { grid-column: span 2; aspect-ratio: 2 / 1; }

/* Menü: Bildstreifen Jubiläumsjahr */
.year-strip { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; margin-top: 22px; border-radius: 18px; overflow: hidden; background: var(--n7); padding: 0; text-align: left; flex-shrink: 0; }
.ys-imgs { position: absolute; inset: 0; }
.ys-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 900ms var(--ease), transform 5200ms linear; }
.ys-img.is-on { opacity: 1; transform: scale(1); }
.ys-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(31,40,55,0) 45%, rgba(31,40,55,.82) 100%); }
.ys-cap { position: absolute; left: 16px; right: 16px; bottom: 16px; color: var(--white); display: flex; flex-direction: column; gap: 3px; }
.ys-kicker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.ys-title { font-size: 19px; line-height: 1.25; }
.ys-meta { font-size: 13px; opacity: .85; }
.ys-bar { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255,255,255,.25); }
.ys-bar i { display: block; height: 100%; width: 100%; background: var(--green); transform-origin: left; animation: ysBar 4200ms linear; }
@keyframes ysBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.year-strip:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.menu { margin-top: 18px; }

/* Chronic: echte Slides + 2026 im Detail */
.tl-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tl-slide.is-photo { cursor: zoom-in; }
.tl-slide:not(.is-on) { pointer-events: none; }
.year-cards { margin: 0 0 40px; }
.yc-h { font-size: 21px; line-height: 1.25; margin-top: 6px; }
.yc-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 24px; margin: 14px -24px 0; padding: 0 24px 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.yc-row::-webkit-scrollbar { display: none; }
.yc-card { flex: 0 0 72%; max-width: 280px; scroll-snap-align: start; text-align: left; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.yc-img { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--n7); margin-bottom: 8px; }
.yc-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.yc-date { font-size: 12px; font-weight: 600; color: var(--n70); }
.yc-title { font-size: 15.5px; line-height: 1.3; color: var(--ink); }
.yc-city { font-size: 13px; color: var(--n70); }
.yc-card:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 14px; }
@media (prefers-reduced-motion: reduce) { .ys-img { transition: opacity 1ms; transform: none; } .ys-bar i { animation: none; } }
