/* =============================================================
   MOBILE: Slide + Fade Animation beim Hinweis-Wechsel
   -------------------------------------------------------------
   Dauer: 200ms raus + 220ms rein. Cubic-bezier für natürlichen
   Bewegungsverlauf. Wird per JS getriggert (animateClueChange in
   script.js).
   ============================================================= */
@keyframes clueSlideOutLeft {
  from { transform: translateX(0);     opacity: 1; }
  to   { transform: translateX(-22%);  opacity: 0; }
}
@keyframes clueSlideOutRight {
  from { transform: translateX(0);     opacity: 1; }
  to   { transform: translateX(22%);   opacity: 0; }
}
@keyframes clueSlideInRight {
  from { transform: translateX(22%);   opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
@keyframes clueSlideInLeft {
  from { transform: translateX(-22%);  opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
.clue-document.clue-anim-out-left  { animation: clueSlideOutLeft  200ms cubic-bezier(0.4, 0, 0.6, 1) forwards; }
.clue-document.clue-anim-out-right { animation: clueSlideOutRight 200ms cubic-bezier(0.4, 0, 0.6, 1) forwards; }
.clue-document.clue-anim-in-right  { animation: clueSlideInRight  220ms cubic-bezier(0.2, 0, 0.2, 1) forwards; }
.clue-document.clue-anim-in-left   { animation: clueSlideInLeft   220ms cubic-bezier(0.2, 0, 0.2, 1) forwards; }

.clue-nav {
  flex-shrink: 0;
  width: 52px;
  align-self: center;
  height: 52px;
  background: var(--paper-deep);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(26, 22, 19, 0.1);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s, color 0.2s;
  font-family: inherit;
  padding: 0;
}
.clue-nav:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(26, 22, 19, 0.2);
}
.clue-nav:active { transform: scale(0.97); }
.clue-nav svg { display: block; }

/* =============================================================
   MOBILE: Swipe-Hint
   -------------------------------------------------------------
   Erscheint nur auf Mobile (<720px), nur wenn der User noch nie
   gewischt hat (localStorage-Flag clueSwipeShown). Eine Hand
   wandert von rechts nach links — wie eine echte Wisch-Geste.
   Pointer-events: none — sie blockiert keine Touch-Events.
   ============================================================= */
.clue-swipe-hint { display: none; }
.clue-swipe-hint.is-hidden { display: none !important; }
@media (max-width: 720px) {
  .clue-swipe-hint:not(.is-hidden) {
    display: block;
    pointer-events: none;
    /* Hand sitzt mittig über dem Foto-Bereich */
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 1px;
    transform: translate(-50%, -10%);
    z-index: 5;
    overflow: visible;
  }
  .clue-swipe-finger {
    position: absolute;
    top: 0;
    left: 50%;
    /* Hand startet rechts vom Mittelpunkt (+60), wischt nach links (-60) */
    transform: translateX(60px);
    color: var(--ink, #2a1f15);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
    animation: clueSwipeFinger 2.4s cubic-bezier(0.4, 0, 0.4, 1) infinite;
  }
  .clue-swipe-finger svg { display: block; }
}
@keyframes clueSwipeFinger {
  /* Hand fadet rechts ein, wischt nach links, fadet links aus,
     springt unsichtbar zurück nach rechts. */
  0%   { transform: translateX(60px);  opacity: 0; }
  12%  { transform: translateX(60px);  opacity: 1; }
  68%  { transform: translateX(-100px); opacity: 1; }
  85%  { transform: translateX(-100px); opacity: 0; }
  100% { transform: translateX(60px);  opacity: 0; }
}

.clue-solved-stamp {
  position: absolute;
  top: 1.25rem;
  right: 1.75rem;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  /* Nur rote Tinte, ohne Kasten/Rahmen - direkt auf die Akte gestempelt */
  color: #d23636;
  transform: rotate(-8deg);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.clue-solved-stamp.visible { opacity: 0.92; }

.clue-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  /* Hell auf dem Leder der Unterlage (siehe .clue-document) */
  color: rgba(239, 231, 212, 0.72);
  text-transform: uppercase;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(239, 231, 212, 0.22);
  margin-bottom: 2rem;
}

.clue-body {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2.5rem;
  align-items: start;
}

/* Centered variant — photo stands alone on the paper, bigger, with
   decorative desk props (pen, tape, paperclip) scattered around. */
.clue-body.clue-body-centered {
  grid-template-columns: 1fr;
  justify-items: center;
  position: relative;
  min-height: 440px;
  padding: 1rem 0 2rem;
}
.clue-body.clue-body-centered .clue-photo-wrap {
  min-height: 420px;
  width: 100%;
  max-width: 520px;
  /* Ueber den Requisiten (z-index 2): ragt ein Prop doch mal in
     die Fotoflaeche, verschwindet er UNTER dem Fotopapier */
  position: relative;
  z-index: 3;
}
.clue-body.clue-body-centered .clue-photo {
  /* Bigger centered photo */
  max-width: 100%;
}
.clue-body.clue-body-centered .clue-photo img {
  display: block;
  /* Centered variant — slightly larger cap since there's no side text. */
  width: auto;
  height: auto;
  max-width: min(520px, 100%);
  max-height: 390px;
}

/* Hide the old text elements we preserved for JS compatibility */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

