/* ============================================================
   HERO — Landing section
   Layout matches Figma 1512×780:
   - Headline (big) centered-vertical at left
   - Subline + CTAs at bottom (left + right)
   - "How we help" floating card top-right
   Fully responsive: desktop → wide tablet → tablet → mobile → phone
   ============================================================ */

.hero {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh; /* dynamic viewport — pocita s listy prohlizece */
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding: 0 var(--page-padding);
  background-color: var(--color-bg);
  overflow: clip;
}

/* Main headline */
.hero__title {
  position: absolute;
  top: 50%;
  left: var(--page-padding);
  transform: translateY(-50%);
  margin: 0;

  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 500;
  line-height: var(--leading-hero);
  letter-spacing: var(--tracking-hero);
  color: var(--color-fg);
  white-space: nowrap;
}

/* Bottom row: subline (left) + CTAs (right) */
.hero__bottom {
  position: absolute;
  left: var(--page-padding);
  right: var(--page-padding);
  bottom: 54px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
}

.hero__subline {
  flex: 1;
  max-width: 724px;
  font-size: var(--text-body-l);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-body-l);
  color: var(--color-fg);
}

.hero__ctas {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

/* "How we help" floating card top-right */
.hero__card {
  position: absolute;
  top: 127px;
  right: var(--page-padding);
  width: fit-content;
  height: 136px;
  padding: 8px 9px;
  border-radius: var(--radius-lg);
  background-color: rgba(132, 132, 132, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  gap: 22px;
  cursor: pointer;
}

.hero__card-video {
  position: relative;
  flex-shrink: 0;
  width: 210px;
  height: 118px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: #ffffff;
}

.hero__card-video img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: rgba(132, 132, 132, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__card-play svg {
  width: 18px;
  height: 18px;
  margin-left: 3px;
  color: #ffffff;
}

.hero__card-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 32px;
  padding-right: 13px; /* 9px card padding + 13px = 22px, matches the gap left of text */
}

.hero__card-title {
  font-size: var(--text-body);
  font-weight: 500;
  line-height: var(--leading-normal);
  letter-spacing: -0.32px;
  color: var(--color-fg);
}

.hero__card-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--leading-normal);
  letter-spacing: -0.32px;
  color: var(--color-fg);
}

.hero__card-badge {
  vertical-align: middle;
  background-color: var(--color-accent);
  color: #ffffff;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  font-size: var(--text-caption);
  font-weight: 400;
  line-height: var(--leading-normal);
  letter-spacing: -0.24px;
}

/* ---------- Rampup animation initial states ---------- */

.hero__title,
.hero__subline,
.hero__ctas,
.hero__card {
  opacity: 0;
  transform: translateY(18px);
}

.hero__title {
  transform: translate(0, calc(-50% + 18px));
}

.no-js .hero__title,
.no-js .hero__subline,
.no-js .hero__ctas,
.no-js .hero__card {
  opacity: 1;
  transform: none;
}
.no-js .hero__title {
  transform: translateY(-50%);
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ---- Wide tablet (1023) — title smaller, card adjusted ---- */
@media (max-width: 1023px) {
  .hero {
    position: relative;             /* VYPNUT sticky — jinak prosakuje skrz následující sekce */
    top: auto;
    min-height: 100vh;              /* full-screen hero i na tabletu */
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-top: 110px;
    padding-bottom: 60px;
  }
  .hero__title {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    white-space: normal;
    margin-top: 60px;
    margin-bottom: 56px;
  }
  .hero__title {
    transform: translateY(18px);          /* keep initial Y offset for rampup */
  }
  .no-js .hero__title {
    transform: none;
  }
  .hero__card {
    position: absolute;
    top: 90px;
    width: 320px;
    height: 110px;
  }
  .hero__card-video {
    width: 160px;
    height: 94px;
  }
  .hero__card-meta {
    padding-top: 20px;
  }
  .hero__bottom {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: auto;               /* tlaci bottom dolu — hero vyplni 100vh */
    padding-top: 60px;
    gap: 32px;
  }
}

/* ---- Tablet portrait (768) — card pushes title down ---- */
@media (max-width: 900px) and (min-width: 768px) {
  .hero__card {
    width: 280px;
    height: 100px;
  }
  .hero__card-video {
    width: 140px;
    height: 84px;
  }
}

/* ---- Mobile (767) ---- */
@media (max-width: 767px) {
  .hero {
    position: relative;             /* VYPNUT sticky */
    top: auto;
    min-height: 100vh;              /* zaplní celý viewport */
    min-height: 100svh;             /* safe viewport pro mobile s adresním řádkem */
    padding-top: 130px;             /* PUSH DOLŮ — card není nalepený nahoru pod navbarem */
    padding-bottom: 56px;
    padding-inline: 0;              /* CARD + TITLE na celou šířku */
    display: flex;
    flex-direction: column;
  }

  .hero__title {
    position: static;
    transform: none;
    white-space: normal;
    margin-top: 56px;               /* pod cardem víc dýchání */
    margin-bottom: 0;
    padding-inline: 20px;           /* title má vlastní 20px padding */
    font-size: 52px;                /* větší — vizuálně "fill" šířku */
    line-height: 1.02;
    letter-spacing: -1.8px;
  }

  .hero__card {
    position: static;
    width: fit-content;             /* kompaktni karta, ne na celou sirku */
    align-self: flex-end;           /* vpravo jako na desktopu */
    margin-inline: 0;
    margin-right: 20px;             /* odsazeni od praveho kraje */
    height: auto;
    padding: 8px;
    margin-top: 0;
    gap: 14px;
    border-radius: 16px;            /* zaoblene rohy — vypada jako karta */
    align-items: center;            /* text vertikalne vycentrovany k nahledu */
  }

  .hero__card-video {
    width: 116px;                   /* vetsi nahled */
    height: 72px;
    border-radius: 12px;
  }

  .hero__card-meta {
    padding-top: 0;                 /* zrusit hack — centrovani resi align-items */
    padding-right: 8px;
    gap: 4px;
    justify-content: center;
  }

  .hero__card-title {
    font-size: 15px;
  }

  .hero__card-action {
    font-size: 14px;
    gap: 6px;
  }

  .hero__card-badge {
    font-size: 11px;
    padding: 0 5px;
  }

  .hero__card-play {
    width: 38px;
    height: 38px;
  }

  .hero__card-play svg {
    width: 13px;
    height: 13px;
  }

  .hero__bottom {
    position: static;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
    margin-top: auto;               /* tlačí bottom dolů aby vyplnil 100vh */
    padding-top: 56px;
    padding-inline: 20px;           /* CTAs + subline mají 20px padding */
  }

  .hero__subline {
    font-size: 16px;
    line-height: 1.5;
  }

  .hero__ctas {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .hero__ctas .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 28px;
  }

  /* Reset transforms on mobile — animation just opacity + y */
  .hero__title,
  .hero__subline,
  .hero__ctas,
  .hero__card {
    transform: translateY(20px);
  }
}

/* ---- Phone (480) ---- */
@media (max-width: 479px) {
  .hero {
    padding-top: 110px;
    padding-bottom: 44px;
    padding-inline: 0;
  }
  .hero__title {
    margin-top: 44px;
    margin-bottom: 0;
    padding-inline: 18px;
    font-size: 44px;
    letter-spacing: -1.4px;
  }
  .hero__card {
    margin-top: 0;
    margin-inline: 18px;
    padding: 7px;
    gap: 12px;
    border-radius: 14px;
  }
  .hero__card-video {
    width: 104px;
    height: 64px;
    border-radius: 11px;
  }
  .hero__card-title {
    font-size: 14px;
  }
  .hero__card-action {
    font-size: 13px;
  }
  .hero__card-play {
    width: 34px;
    height: 34px;
  }
  .hero__card-play svg {
    width: 12px;
    height: 12px;
  }
  .hero__bottom {
    padding-top: 44px;
    padding-inline: 18px;
    gap: 24px;
  }
  .hero__subline {
    font-size: 15px;
  }
}