/* ═══════════════════════════════════════════════════
   TOPCOM — Werbeberatung & Konzeption
   ═══════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════
   PAGE HERO — Abstract Animated (no image needed)
   ══════════════════════════════════════════════════ */
.page-hero {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--black);
}

/* ── Abstract Background Layer ── */
.hero-abstract {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

/* Subtle dot grid pattern */
.abs-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0;
  animation: fadeIn 2s ease 0.3s forwards;
}

/* Gradient overlays for depth */
.abs-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(255,255,255,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(255,255,255,0.03) 0%, transparent 50%),
    radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.3) 100%);
  z-index: 2;
}

/* ── Floating Shapes ── */
.abs-shape {
  position: absolute;
  opacity: 0;
  animation-fill-mode: forwards;
}

.abs-ring {
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 50%;
}
.abs-1 {
  width: 200px; height: 200px;
  top: 10%; left: 5%;
  animation: fadeIn 1.2s ease 0.4s forwards, absFloat1 18s ease-in-out infinite;
}
.abs-2 {
  width: 120px; height: 120px;
  bottom: 15%; right: 8%;
  border-color: rgba(255,255,255,0.06);
  animation: fadeIn 1.2s ease 0.7s forwards, absFloat2 22s ease-in-out infinite;
}

.abs-dot {
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
}
.abs-3 { width: 6px; height: 6px; top: 20%; right: 25%; animation: fadeIn 0.8s ease 0.3s forwards, absFloat3 9s ease-in-out infinite; }
.abs-4 { width: 4px; height: 4px; bottom: 30%; left: 18%; animation: fadeIn 0.8s ease 0.5s forwards, absFloat1 11s ease-in-out infinite; }
.abs-5 { width: 5px; height: 5px; top: 65%; right: 12%; animation: fadeIn 0.8s ease 0.8s forwards, absFloat2 10s ease-in-out infinite; }

.abs-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}
.abs-6 { width: 140px; top: 35%; left: 2%; transform: rotate(-20deg); animation: fadeIn 1s ease 0.6s forwards, absFloat3 16s ease-in-out infinite; }
.abs-7 { width: 90px; bottom: 25%; right: 4%; transform: rotate(30deg); animation: fadeIn 1s ease 0.9s forwards, absFloat1 14s ease-in-out infinite; }

.abs-cross { width: 20px; height: 20px; }
.abs-8 {
  top: 12%; right: 20%;
  animation: fadeIn 1s ease 0.5s forwards, shapeSpin 25s linear infinite;
}
.abs-8::before, .abs-8::after {
  content: ''; position: absolute; background: rgba(255,255,255,0.12);
}
.abs-8::before { width: 100%; height: 2px; top: 50%; transform: translateY(-50%); }
.abs-8::after { width: 2px; height: 100%; left: 50%; transform: translateX(-50%); }

.abs-square {
  border: 1.5px solid rgba(255,255,255,0.06);
}
.abs-9 { width: 35px; height: 35px; bottom: 18%; left: 28%; animation: fadeIn 1s ease 1s forwards, shapeSpin 30s linear infinite reverse; }

.abs-circle-fill {
  border-radius: 50%;
  background: rgba(255,255,255,0.025);
}
.abs-10 { width: 350px; height: 350px; top: -100px; right: -80px; animation: fadeIn 1.5s ease 0.2s forwards, absFloat2 25s ease-in-out infinite; }
.abs-11 { width: 250px; height: 250px; bottom: -80px; left: -60px; animation: fadeIn 1.5s ease 0.4s forwards, absFloat3 20s ease-in-out infinite; }

@keyframes absFloat1 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(15px, -20px); }
  66% { transform: translate(-12px, 12px); }
}
@keyframes absFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, -15px); }
}
@keyframes absFloat3 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(12px, 15px); }
  75% { transform: translate(-18px, -8px); }
}
@keyframes shapeSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.page-hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 var(--space-lg);
  max-width: 800px;
}

/* Label */
.hero-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeInDown 0.8s var(--ease-out) 0.4s forwards;
}

.hero-label span:not(.label-line) {
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
}

.label-line {
  display: block;
  height: 1px;
  width: 0;
  background: rgba(255,255,255,0.4);
  animation: lineDraw 1s var(--ease-out) 1s forwards;
}

@keyframes lineDraw {
  to { width: 60px; }
}

/* Quote */
.hero-quote {
  opacity: 0;
  animation: fadeInUp 1s var(--ease-out) 0.6s forwards;
}

.quote-mark {
  display: block;
  font-size: 6rem;
  line-height: 0.5;
  color: rgba(255,255,255,0.15);
  font-family: Georgia, serif;
  margin-bottom: var(--space-sm);
  animation: quotePulse 3s ease-in-out infinite;
}

@keyframes quotePulse {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50%      { opacity: 0.25; transform: scale(1.05); }
}

.hero-quote p {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.hero-quote cite {
  font-size: var(--fs-md);
  font-style: normal;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
}

/* Corner accents */
.hero-corner {
  position: absolute;
  width: 70px;
  height: 70px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 1s var(--ease-out) 1.2s forwards;
}

.hero-corner-tl {
  top: 30px;
  left: 30px;
  border-top: 2px solid rgba(255,255,255,0.15);
  border-left: 2px solid rgba(255,255,255,0.15);
}

.hero-corner-br {
  bottom: 30px;
  right: 30px;
  border-bottom: 2px solid rgba(255,255,255,0.15);
  border-right: 2px solid rgba(255,255,255,0.15);
}

/* ══════════════════════════════════════════════════
   INTRO SECTION
   ══════════════════════════════════════════════════ */
.wb-intro {
  background: var(--white);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-2xl);
  align-items: center;
}

/* Stats */
.intro-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.stat-item {
  padding: var(--space-md);
  border-left: 3px solid var(--black);
  transition: transform 0.3s var(--ease-out);
}

.stat-item:hover {
  transform: translateX(10px);
}

.stat-number {
  display: block;
  font-size: var(--fs-3xl);
  font-weight: 900;
  color: var(--black);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Intro text */
.intro-text h2 {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--black);
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.intro-text h2 em {
  font-style: italic;
  font-weight: 300;
  color: var(--gray-500);
}

.text-divider {
  width: 60px;
  height: 3px;
  background: var(--black);
  margin-bottom: var(--space-md);
  transform-origin: left;
  transform: scaleX(0);
  animation: dividerIn 0.8s var(--ease-out) forwards;
  animation-play-state: paused;
}

.visible .text-divider,
.reveal-right.visible .text-divider {
  animation-play-state: running;
}

@keyframes dividerIn {
  to { transform: scaleX(1); }
}

.intro-text p {
  font-size: var(--fs-md);
  line-height: 1.8;
  color: var(--gray-600);
}

/* ══════════════════════════════════════════════════
   SERVICES LIST
   ══════════════════════════════════════════════════ */
.wb-services {
  background: var(--gray-100);
}

.wb-services .section-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--gray-500);
  margin-bottom: var(--space-sm);
}

.wb-services .section-title {
  font-size: var(--fs-2xl);
  color: var(--black);
}

.wb-services .section-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--gray-500);
}

.services-list {
  max-width: 900px;
  margin: var(--space-xl) auto 0;
}

.service-list-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--gray-200);
  cursor: default;
  transition: all 0.3s var(--ease-out);
}

.service-list-item:first-child {
  border-top: 1px solid var(--gray-200);
}

.service-list-item:hover {
  padding-left: var(--space-md);
  background: var(--white);
  border-radius: 8px;
}

.sli-number {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--gray-300);
  min-width: 36px;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}

.service-list-item:hover .sli-number {
  color: var(--black);
}

.sli-text {
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--gray-700);
  flex: 1;
  transition: color 0.3s;
}

.service-list-item:hover .sli-text {
  color: var(--black);
  font-weight: 600;
}

.sli-line {
  height: 2px;
  width: 0;
  background: var(--black);
  transition: width 0.5s var(--ease-out);
  flex-shrink: 0;
}

.service-list-item:hover .sli-line {
  width: 40px;
}

/* Linked service item */
a.service-list-link { text-decoration: none; color: inherit; cursor: pointer; }
a.service-list-link:hover { background: var(--black); border-radius: 8px; }
a.service-list-link:hover .sli-number { color: rgba(255,255,255,0.4); }
a.service-list-link:hover .sli-text { color: var(--white); }
a.service-list-link:hover .sli-line { background: var(--white); }
.sli-arrow {
  flex-shrink: 0; color: var(--gray-300);
  transition: all 0.3s var(--ease-out);
  opacity: 0; transform: translate(-5px, 5px);
}
a.service-list-link:hover .sli-arrow { opacity: 1; color: var(--white); transform: translate(0, 0); }

/* Stagger service items */
.service-list-item.reveal:nth-child(1)  { transition-delay: 0.00s; }
.service-list-item.reveal:nth-child(2)  { transition-delay: 0.03s; }
.service-list-item.reveal:nth-child(3)  { transition-delay: 0.06s; }
.service-list-item.reveal:nth-child(4)  { transition-delay: 0.09s; }
.service-list-item.reveal:nth-child(5)  { transition-delay: 0.12s; }
.service-list-item.reveal:nth-child(6)  { transition-delay: 0.15s; }
.service-list-item.reveal:nth-child(7)  { transition-delay: 0.18s; }
.service-list-item.reveal:nth-child(8)  { transition-delay: 0.21s; }
.service-list-item.reveal:nth-child(9)  { transition-delay: 0.24s; }
.service-list-item.reveal:nth-child(10) { transition-delay: 0.27s; }
.service-list-item.reveal:nth-child(11) { transition-delay: 0.30s; }
.service-list-item.reveal:nth-child(12) { transition-delay: 0.33s; }
.service-list-item.reveal:nth-child(13) { transition-delay: 0.36s; }

/* ══════════════════════════════════════════════════
   APPROACH SECTION
   ══════════════════════════════════════════════════ */
.wb-approach {
  background: var(--white);
}

.approach-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.approach-card {
  padding: var(--space-xl);
  background: var(--gray-100);
  border-radius: 20px;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.approach-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--black);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}

.approach-card:hover::before {
  transform: scaleX(1);
}

.approach-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.approach-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: var(--black);
  transition: all 0.4s var(--ease-out);
}

.approach-card:hover .approach-icon {
  background: var(--black);
  color: var(--white);
  transform: scale(1.05);
}

.approach-card h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--black);
  margin-bottom: var(--space-sm);
}

.approach-card p {
  font-size: var(--fs-base);
  line-height: 1.8;
  color: var(--gray-600);
}

/* ══════════════════════════════════════════════════
   TRUST / PARTNERSHIP
   ══════════════════════════════════════════════════ */
.wb-trust {
  background: var(--black);
}

.trust-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  padding: var(--space-xl) 0;
}

.trust-accent {
  width: 60px;
  height: 4px;
  background: var(--white);
  margin: 0 auto var(--space-lg);
  transform: scaleX(0);
  transition: transform 0.8s var(--ease-out);
}

.trust-inner.visible .trust-accent {
  transform: scaleX(1);
}

.trust-inner h2 {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--white);
  margin-bottom: var(--space-md);
}

.trust-inner h2 em {
  font-style: italic;
  font-weight: 300;
  color: var(--gray-400);
}

.trust-inner p {
  font-size: var(--fs-md);
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-sm);
}

.trust-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  margin-top: var(--space-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--black);
  background: var(--white);
  border-radius: 100px;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.trust-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gray-200);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
  z-index: 0;
  border-radius: inherit;
}

.trust-cta:hover::before {
  transform: scaleX(1);
}

.trust-cta span,
.trust-cta svg {
  position: relative;
  z-index: 1;
}

.trust-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255,255,255,0.1);
}

.trust-cta svg {
  transition: transform 0.3s var(--ease-out);
}

.trust-cta:hover svg {
  transform: translateX(5px);
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */
@media (max-width: 968px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .intro-stats {
    flex-direction: row;
    justify-content: space-between;
  }

  .approach-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .page-hero {
    height: 65vh;
    min-height: 400px;
  }

  .page-hero-content {
    padding: 0 var(--space-sm);
  }

  .hero-quote p {
    font-size: 1.8rem;
  }

  .hero-label span:not(.label-line) {
    font-size: var(--fs-xs);
    letter-spacing: 0.12em;
  }

  .label-line { display: none; }
  .hero-corner { display: none; }

  .quote-mark {
    font-size: 4rem;
  }

  .intro-stats {
    flex-direction: column;
  }

  .stat-number {
    font-size: var(--fs-2xl);
  }

  .sli-text {
    font-size: var(--fs-base);
  }

  .approach-card {
    padding: var(--space-lg);
  }

  .trust-inner h2 {
    font-size: var(--fs-xl);
  }
}

/* ══════════════════════════════════════════════════
   COMMI #2 — Shy Easter Egg
   ══════════════════════════════════════════════════ */

/* Trust section sits above Commi to hide its lower body */
.wb-trust {
  position: relative;
  z-index: 2;
}

/* ── Butterfly net (DOM element, follows the cursor during the hunt) ──
   The real cursor is hidden; #commi2Net is positioned by JS so the hoop
   center (58,54 in the SVG) sits on the mouse. Header keeps its cursor. */
body.commi2-chase,
body.commi2-chase * {
  cursor: none !important;
}
body.commi2-chase .site-header,
body.commi2-chase .site-header * {
  cursor: auto !important;
}

#commi2Net {
  position: fixed;
  left: 0;
  top: 0;
  width: 170px;
  height: 200px;
  z-index: 9400;
  pointer-events: none;
  will-change: transform;
  animation: c2nAppear 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes c2nAppear {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.c2n-svg {
  display: block;
  overflow: visible;
  /* Light halo + soft shadow so the dark net reads on any background */
  filter:
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.55))
    drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}

/* Swing pivots at the grip end of the handle */
.c2n-swing {
  transform-origin: 160px 188px;
}

.c2n-handle {
  stroke: #2a2a2a;
  stroke-width: 7;
  stroke-linecap: round;
}
.c2n-grip {
  stroke: #4a4a4a;
  stroke-width: 9;
  stroke-linecap: round;
}
.c2n-ferrule {
  fill: #ffd700;
  stroke: #ccaa00;
  stroke-width: 1.5;
}
.c2n-rim {
  fill: none;
  stroke: #1a1a1a;
  stroke-width: 4.5;
  stroke-linecap: round;
}
.c2n-bagfill {
  fill: rgba(0, 0, 0, 0.05);
  stroke: #1a1a1a;
  stroke-width: 2.4;
  stroke-linejoin: round;
}
.c2n-mesh {
  fill: none;
  stroke: rgba(0, 0, 0, 0.42);
  stroke-width: 1.2;
}

/* The bag hangs loose and sways as you carry the net */
.c2n-bag {
  transform-origin: 58px 54px;
  animation: c2nBagSway 2.4s ease-in-out infinite;
}
@keyframes c2nBagSway {
  0%, 100% { transform: rotate(-3.5deg); }
  50%      { transform: rotate(3.5deg); }
}

/* Whoosh arcs — flash only while swinging */
.c2n-whoosh {
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 140;
  stroke-dashoffset: 140;
  opacity: 0;
}
.c2n-whoosh2 { stroke-width: 1.8; }

/* The swing: wind up, slam the hoop down, settle */
#commi2Net.swinging .c2n-swing {
  animation: c2nSwing 0.38s cubic-bezier(0.3, 0, 0.2, 1);
}
@keyframes c2nSwing {
  0%   { transform: rotate(0deg)  translate(0, 0)   scale(1); }
  24%  { transform: rotate(16deg) translate(6px, -20px) scale(1); }
  40%  { transform: rotate(-7deg) translate(-4px, 12px) scale(1.05, 0.9); }
  58%  { transform: rotate(-2deg) translate(-2px, 7px)  scale(1.02, 0.97); }
  100% { transform: rotate(0deg)  translate(0, 0)   scale(1); }
}
#commi2Net.swinging .c2n-whoosh {
  animation: c2nWhoosh 0.3s ease-out 0.06s;
}
@keyframes c2nWhoosh {
  0%   { opacity: 0;    stroke-dashoffset: 140; }
  30%  { opacity: 0.9;  stroke-dashoffset: 60; }
  100% { opacity: 0;    stroke-dashoffset: -40; }
}
/* Bag whips behind the swing */
#commi2Net.swinging .c2n-bag {
  animation: c2nBagWhip 0.38s cubic-bezier(0.3, 0, 0.2, 1);
}
@keyframes c2nBagWhip {
  0%   { transform: rotate(0deg); }
  24%  { transform: rotate(14deg) scaleY(0.92); }
  45%  { transform: rotate(-12deg) scaleY(1.1); }
  70%  { transform: rotate(5deg); }
  100% { transform: rotate(0deg); }
}

/* Caught! Rim glows gold, the bag kicks and wiggles with its prey */
#commi2Net.caught .c2n-rim {
  stroke: #ffd700;
  filter:
    drop-shadow(0 0 4px rgba(255, 246, 179, 0.9))
    drop-shadow(0 0 14px rgba(255, 215, 0, 0.6));
}
#commi2Net.caught .c2n-bag {
  animation: c2nBagCatch 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes c2nBagCatch {
  0%   { transform: rotate(0deg)   scaleY(1); }
  18%  { transform: rotate(10deg)  scaleY(1.16); }
  40%  { transform: rotate(-8deg)  scaleY(1.08); }
  62%  { transform: rotate(5deg)   scaleY(1.04); }
  82%  { transform: rotate(-2.5deg) scaleY(1.01); }
  100% { transform: rotate(0deg)   scaleY(1); }
}
#commi2Net.done {
  transition: opacity 0.4s ease;
  opacity: 0;
}

/* Hide on mobile */
@media (max-width: 1023px) {
  #commi2 { display: none !important; }
}

#commi2 {
  position: absolute;
  z-index: 1;
  width: 64px;
  height: 64px;
  pointer-events: none;
  top: -200px;
  opacity: 1;
  transition: opacity 0.8s ease;
}

#commi2 img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
  /* Thick dark outline so white icon is visible on any background */
  filter:
    drop-shadow(1px 0 0 rgba(0,0,0,0.95))
    drop-shadow(-1px 0 0 rgba(0,0,0,0.95))
    drop-shadow(0 1px 0 rgba(0,0,0,0.95))
    drop-shadow(0 -1px 0 rgba(0,0,0,0.95))
    drop-shadow(2px 0 0 rgba(0,0,0,0.6))
    drop-shadow(-2px 0 0 rgba(0,0,0,0.6))
    drop-shadow(0 2px 0 rgba(0,0,0,0.6))
    drop-shadow(0 -2px 0 rgba(0,0,0,0.6))
    drop-shadow(0 4px 16px rgba(0,0,0,0.5));
  pointer-events: auto;
  cursor: pointer;
}

/* Gentle bob when peeking */
#commi2.peeking img {
  animation: commiPeekBob 2.2s ease-in-out infinite;
}
@keyframes commiPeekBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* Frantic run — pure panic. Not clickable: you catch it with the NET */
#commi2.running img {
  animation: commiRunWiggle 0.2s ease-in-out infinite;
  pointer-events: none;
  cursor: none;
  filter:
    drop-shadow(1px 0 0 rgba(0,0,0,0.95))
    drop-shadow(-1px 0 0 rgba(0,0,0,0.95))
    drop-shadow(0 1px 0 rgba(0,0,0,0.95))
    drop-shadow(0 -1px 0 rgba(0,0,0,0.95))
    drop-shadow(2px 0 0 rgba(0,0,0,0.6))
    drop-shadow(-2px 0 0 rgba(0,0,0,0.6))
    drop-shadow(0 0 14px rgba(255,255,255,0.55))
    drop-shadow(0 6px 20px rgba(0,0,0,0.5));
}
@keyframes commiRunWiggle {
  0%   { transform: rotate(-16deg) scale(0.93); }
  25%  { transform: rotate(5deg)   scale(1.08); }
  50%  { transform: rotate(16deg)  scale(0.93); }
  75%  { transform: rotate(-5deg)  scale(1.08); }
  100% { transform: rotate(-16deg) scale(0.93); }
}

/* Out of breath — pants heavily mid-chase, still scurrying (catch window!) */
#commi2.running.tired img {
  animation: commiPant 0.55s ease-in-out infinite;
}
@keyframes commiPant {
  0%, 100% { transform: rotate(-4deg) scale(0.96, 1.02); }
  50%      { transform: rotate(4deg)  scale(1.05, 0.94); }
}

/* Caught — brief gold pulse before the collection overlay takes over */
#commi2.caught img {
  animation: commi2GoldPulse 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
  filter:
    drop-shadow(0 0 4px rgba(255, 246, 179, 0.95))
    drop-shadow(0 0 14px rgba(255, 215, 0, 0.85))
    drop-shadow(0 0 32px rgba(204, 170, 0, 0.55))
    drop-shadow(0 4px 16px rgba(0, 0, 0, 0.35));
}
@keyframes commi2GoldPulse {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.3); }
  100% { transform: scale(1.08); }
}
#commi2.caught::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 215, 0, 0.8);
  animation: commi2GoldRing 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
  pointer-events: none;
}
@keyframes commi2GoldRing {
  0%   { transform: scale(0.4); opacity: 1; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* Speech bubble */
.commi2-bubble {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #1a1a1a;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-family, 'Inter', sans-serif);
  padding: 8px 14px;
  border-radius: 10px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.commi2-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #fff;
}
.commi2-bubble.visible {
  opacity: 1;
}
