/* Základ + zákaz zoom gest (ponecháno) */
html, body {
  margin: 0;
  height: 100%;
  overscroll-behavior: none;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

/* Canvas vždy přes viewport */
canvas {
  display: block;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

/* === Instagram badge uprostřed (originální gradient + glow + puls) === */

.ig-link {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* „Badge“ – zaoblený čtverec s IG gradientem */
.ig-badge {
  width: clamp(64px, 14vw, 140px);
  aspect-ratio: 1 / 1;
  border-radius: 22%;
  background:
    radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, transparent 6%),
    linear-gradient(145deg, #fd5949 0%, #d6249f 50%, #285AEB 100%);
  position: relative;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.35),
    0 0 0 0 rgba(255, 64, 160, 0.0);
  transition: transform .2s ease;
}

/* Bílé glyph logo nad badge */
.ig-glyph {
  position: absolute;
  width: calc(clamp(64px, 14vw, 140px) * 0.58);
  height: auto;
  fill: #ffffff;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,.45));
  pointer-events: none;
}

/* Světelné záření pomocí „aury“ kolem badge */
.ig-link::before {
  content: "";
  position: absolute;
  inset: -35%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 90, 160, .36), rgba(70, 100, 255, .18) 60%, transparent 70%);
  filter: blur(14px);
  z-index: -1;
  opacity: .9;
  animation: igPulse 2.25s ease-in-out infinite;
}

/* Jemný puls i badge samotné (škálování) */
.ig-link { animation: igScale 2.25s ease-in-out infinite; }

/* Hover/Focus – zvýraznění na desktopu */
.ig-link:hover .ig-badge,
.ig-link:focus-visible .ig-badge {
  transform: scale(1.06);
}

/* Focus pro klávesnici */
.ig-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.55), 0 0 0 6px rgba(0,0,0,.35);
  border-radius: 16px;
}

/* Animace */
@keyframes igPulse {
  0%   { opacity: .85; transform: scale(0.96); }
  50%  { opacity: 1;   transform: scale(1.06); }
  100% { opacity: .85; transform: scale(0.96); }
}

@keyframes igScale {
  0%   { transform: translate(-50%, -50%) scale(1); }
  50%  { transform: translate(-50%, -50%) scale(1.04); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Silnější svit a puls na mobilech */
@media (pointer: coarse) {
  .ig-link::before {
    filter: blur(18px);
    opacity: 1;
  }
  .ig-badge {
    box-shadow:
      0 12px 36px rgba(0,0,0,0.45),
      0 0 0 0 rgba(255, 64, 160, .0);
  }
  .ig-link { animation-duration: 2s; }
}

/* Vylepšení výkonu na některých mobilech */
.ig-badge, .ig-link::before, .ig-glyph {
  will-change: transform, opacity, filter;
}

/* === Tooltip pod ikonou === */
.ig-tooltip {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.65);
  color: #fff;
  font: 500 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  white-space: nowrap;
  letter-spacing: .1px;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
  box-shadow:
    0 6px 16px rgba(0,0,0,.35),
    0 0 0 1px rgba(255,255,255,.06) inset;
  opacity: 1;
  transition: opacity .2s ease, transform .2s ease;
}

/* šipka tooltipu */
.ig-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: rgba(0,0,0,.65);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset;
}

/* Jemné “připlutí” při hover/focus na desktopu */
@media (hover: hover) and (pointer: fine) {
  .ig-link .ig-tooltip {
    opacity: .0;
    transform: translate(-50%, 4px);
  }
  .ig-link:hover .ig-tooltip,
  .ig-link:focus-visible .ig-tooltip {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Skrytí tooltipu na menších displejích (automaticky) */
@media (max-width: 520px) {
  .ig-tooltip { display: none; }
}