/* ==========================================================================
   TOONHUB — karusel sběratelských figurek
   Ukázkový koncept · Cina Digital
   ========================================================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #F4845F;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
}

/* --------------------------------------------------------------------------
   Vnější obal — barva pozadí se prolíná spolu s karuselem (650 ms)
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  transition: background-color 650ms cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

.hero.is-loaded {
  opacity: 1;
  transition:
    background-color 650ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 600ms ease;
}

.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Zrnitá textura (SVG fractalNoise, baseFrequency 0.9, numOctaves 4)
   -------------------------------------------------------------------------- */

.grain {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='200'%20height='200'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.9'%20numOctaves='4'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'%20opacity='0.08'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  background-repeat: repeat;
}

/* --------------------------------------------------------------------------
   Obří přízračný nápis „3D TVAR"
   -------------------------------------------------------------------------- */

.ghost {
  position: absolute;
  left: 0;
  right: 0;
  top: 18%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  font-family: 'Anton', sans-serif;
  font-size: clamp(90px, 28vw, 380px);
  font-weight: 900;
  color: #ffffff;
  opacity: 1;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Značka vlevo nahoře
   -------------------------------------------------------------------------- */

.brand {
  position: absolute;
  top: 24px;
  left: 16px;
  z-index: 60;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.9;
  letter-spacing: 0.18em;
}

/* --------------------------------------------------------------------------
   Diskrétní kredit ukázky vpravo nahoře
   -------------------------------------------------------------------------- */

.credit {
  position: absolute;
  top: 24px;
  right: 16px;
  z-index: 60;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 200ms ease;
}

.credit:hover {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Karusel — 4 figurky, role (střed / vlevo / vpravo / vzadu) řídí skript
   -------------------------------------------------------------------------- */

.carousel {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.figure {
  position: absolute;
  aspect-ratio: 0.6 / 1;
  will-change: transform, filter, opacity;
  transition:
    transform 650ms cubic-bezier(0.4, 0, 0.2, 1),
    filter 650ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 650ms cubic-bezier(0.4, 0, 0.2, 1),
    left 650ms cubic-bezier(0.4, 0, 0.2, 1),
    height 650ms cubic-bezier(0.4, 0, 0.2, 1),
    bottom 650ms cubic-bezier(0.4, 0, 0.2, 1);
}

.figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Text a navigační šipky vlevo dole
   -------------------------------------------------------------------------- */

.panel {
  position: absolute;
  bottom: 24px;
  left: 16px;
  z-index: 60;
  max-width: 320px;
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #ffffff;
  opacity: 0.95;
  margin-bottom: 8px;
}

.panel-desc {
  display: none;
  font-size: 12px;
  color: #ffffff;
  opacity: 0.85;
  line-height: 1.6;
  margin-bottom: 16px;
}

.panel-nav {
  display: flex;
  gap: 12px;
}

.nav-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background-color: transparent;
  color: #ffffff;
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease;
}

.nav-btn:hover {
  transform: scale(1.08);
  background-color: rgba(255, 255, 255, 0.12);
}

.nav-btn:active {
  transform: scale(1.02);
}

.nav-btn svg {
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Odkaz „Objevte ji" vpravo dole (Anton)
   -------------------------------------------------------------------------- */

.discover {
  position: absolute;
  bottom: 24px;
  right: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Anton', sans-serif;
  font-size: clamp(20px, 4vw, 56px);
  font-weight: 400;
  color: #ffffff;
  opacity: 0.95;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 200ms ease;
}

.discover:hover {
  opacity: 1;
}

.discover svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Upozornění pro ukázkové CTA
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 128px;
  z-index: 100;
  transform: translateX(-50%) translateY(12px);
  background-color: rgba(20, 20, 20, 0.85);
  color: #ffffff;
  font-size: 13px;
  line-height: 1.4;
  padding: 10px 18px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease, transform 250ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------------
   Breakpoint sm (min-width: 640px)
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .brand {
    left: 32px;
  }

  .credit {
    right: 40px;
    font-size: 11px;
  }

  .panel {
    bottom: 80px;
    left: 96px;
  }

  .panel-title {
    font-size: 22px;
    margin-bottom: 12px;
  }

  .panel-desc {
    display: block;
    font-size: 14px;
    margin-bottom: 20px;
  }

  .nav-btn {
    width: 64px;
    height: 64px;
  }

  .discover {
    bottom: 80px;
    right: 40px;
    gap: 12px;
  }

  .discover svg {
    width: 32px;
    height: 32px;
  }

  .toast {
    bottom: 40px;
  }
}

/* --------------------------------------------------------------------------
   Šetrný režim pro uživatele s omezením animací
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .hero,
  .figure,
  .nav-btn,
  .discover,
  .toast {
    transition-duration: 0.01ms !important;
  }
}
