/* ZH Sped — intro animace
   Struktura: 12 s AI video (Sprinter) → 2 s logo panel → fade na web
   Celkem: ~14,5 s */

/* Overlay pokrývá celou obrazovku */
.zh-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #05070d;
  overflow: hidden;
  pointer-events: none;
  animation: zh-intro-fadeout 0.7s ease-in 13.8s forwards;
}

/* Video vrstva */
.zh-intro__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  animation: zh-intro-video 12.5s ease-out 0s forwards;
}

@keyframes zh-intro-video {
  0% { opacity: 0; }
  3% { opacity: 1; }         /* rychlý fade-in */
  92% { opacity: 1; }        /* drží se do konce videa */
  100% { opacity: 0; }       /* jemný fade-out než přijde logo panel */
}

/* Logo panel — objeví se pod koncem videa, zabere ~2 s */
.zh-intro__logo-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: radial-gradient(ellipse at 50% 50%, #1a2138 0%, #0a0e1a 60%, #05070d 100%);
  opacity: 0;
  animation: zh-intro-panel 3s ease-out 11.5s forwards;
}

@keyframes zh-intro-panel {
  0% { opacity: 0; }
  20% { opacity: 1; }        /* 12,1 s — panel viditelný */
  85% { opacity: 1; }        /* 14,05 s — stále */
  100% { opacity: 0; }       /* 14,5 s — fade */
}

/* Hvězdné pozadí + polární záře v panelu (subtile) */
.zh-intro__logo-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.5) 0.5px, transparent 1px),
    radial-gradient(circle at 45% 15%, rgba(255,255,255,0.35) 0.5px, transparent 1px),
    radial-gradient(circle at 70% 40%, rgba(255,255,255,0.45) 0.5px, transparent 1px),
    radial-gradient(circle at 85% 25%, rgba(255,255,255,0.6) 0.5px, transparent 1px),
    radial-gradient(circle at 15% 60%, rgba(255,255,255,0.3) 0.5px, transparent 1px),
    radial-gradient(circle at 55% 80%, rgba(255,255,255,0.4) 0.5px, transparent 1px),
    radial-gradient(ellipse at 75% 35%, rgba(74,222,128,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 25% 40%, rgba(251,146,60,0.10) 0%, transparent 50%);
  background-size: 3px 3px, 4px 4px, 3px 3px, 4px 4px, 3px 3px, 4px 4px, 100% 100%, 100% 100%;
  pointer-events: none;
}

/* Logo ZH ▶ SPED */
.zh-intro__brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  color: #ffffff;
  opacity: 0;
  transform: scale(0.85);
  animation: zh-intro-brand 1s cubic-bezier(0.16, 1, 0.3, 1) 12.0s forwards;
  z-index: 2;
}

.zh-intro__brand-name {
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: 0.02em;
  text-shadow: 0 0 30px rgba(251, 146, 60, 0.2);
}

.zh-intro__brand-arrow {
  width: clamp(60px, 10vw, 100px);
  height: auto;
  filter: drop-shadow(0 0 15px rgba(251, 146, 60, 0.8));
}

/* Oranžový podtržítko efekt pod logem */
.zh-intro__underline {
  position: relative;
  height: 3px;
  width: 0;
  background: linear-gradient(to right, transparent 0%, #fb923c 20%, #f97316 50%, #fb923c 80%, transparent 100%);
  box-shadow: 0 0 20px rgba(251, 146, 60, 0.6);
  opacity: 0;
  animation: zh-intro-underline 1s ease-out 12.5s forwards;
  z-index: 2;
}

@keyframes zh-intro-underline {
  0% { width: 0; opacity: 0; }
  30% { opacity: 1; }
  100% { width: min(60vw, 500px); opacity: 1; }
}

/* Tagline pod logem */
.zh-intro__tagline {
  position: relative;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(0.9rem, 1.5vw, 1.15rem);
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(15px);
  animation: zh-intro-tagline 0.9s ease-out 12.8s forwards;
  z-index: 2;
  text-align: center;
  padding: 0 1rem;
  max-width: 90vw;
}

@keyframes zh-intro-brand {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes zh-intro-tagline {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes zh-intro-fadeout {
  from { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}

/* Tlačítko "přeskočit" v rohu */
.zh-intro__skip {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 3;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  opacity: 0;
  animation: zh-intro-skip 0.5s ease-out 1.5s forwards;
}
.zh-intro__skip:hover {
  color: #ffffff;
  border-color: rgba(251, 146, 60, 0.5);
  background: rgba(251, 146, 60, 0.15);
}

@keyframes zh-intro-skip {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 0.85; transform: translateY(0); }
}

/* Skryté body během intra */
body.zh-intro-active {
  overflow: hidden;
}
body.zh-intro-active > *:not(.zh-intro) {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}
body.zh-intro-done > *:not(.zh-intro) {
  opacity: 1;
}
body.zh-intro-done .zh-intro {
  display: none;
}

/* Respekt k prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .zh-intro {
    display: none;
  }
  body.zh-intro-active {
    overflow: auto;
  }
  body.zh-intro-active > *:not(.zh-intro) {
    opacity: 1;
  }
}

/* Mobil */
@media (max-width: 640px) {
  .zh-intro__brand {
    gap: 12px;
  }
  .zh-intro__skip {
    bottom: 16px;
    right: 16px;
    font-size: 0.7rem;
    padding: 8px 14px;
  }
}
