/* ---------- hero: a cloud of ink points that tells the path from ad to checkout ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding: 84px var(--gutter) clamp(36px, 7vh, 72px);
  text-align: center;
  background: var(--paper);
}

/* the cloud: drawn by hero.js, decorative; it thins out long before the section ends */
.hero__cloud {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 72%, rgba(0, 0, 0, 0.95) 75%, rgba(0, 0, 0, 0.86) 78%, rgba(0, 0, 0, 0.74) 81%, rgba(0, 0, 0, 0.6) 84%, rgba(0, 0, 0, 0.45) 87%, rgba(0, 0, 0, 0.31) 90%, rgba(0, 0, 0, 0.19) 93%, rgba(0, 0, 0, 0.09) 96%, rgba(0, 0, 0, 0.03) 98.5%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 72%, rgba(0, 0, 0, 0.95) 75%, rgba(0, 0, 0, 0.86) 78%, rgba(0, 0, 0, 0.74) 81%, rgba(0, 0, 0, 0.6) 84%, rgba(0, 0, 0, 0.45) 87%, rgba(0, 0, 0, 0.31) 90%, rgba(0, 0, 0, 0.19) 93%, rgba(0, 0, 0, 0.09) 96%, rgba(0, 0, 0, 0.03) 98.5%, transparent 100%);
}

/* the shape and the headline as one centred group that owns the first screen */
.hero__center {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* the stage holds the shape; the cloud reads its box, so the layout stays in CSS */
.hero__stage {
  position: relative;
  z-index: 0;
  flex: 1 1 0;
  width: 100%;
  min-height: 200px;
  max-height: min(470px, 92vw);
  display: grid;
  place-items: center;
}

/* with no script or no WebGL, the bag rests as a still stipple */
.hero__still { display: none; width: auto; height: 82%; max-height: 380px; }
html:not(.js) .hero .hero__still,
.hero.is-flat .hero__still { display: block; }

.hero__title {
  position: relative;
  z-index: 1;
  margin-top: clamp(14px, 2.6vh, 30px);
  font-size: clamp(40px, 5.8vw, 92px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}
.hero__title > span { display: block; width: fit-content; margin-inline: auto; }
.hero__quiet { color: var(--t-quiet); }
.hero__loud { color: var(--ink); }
.hero .hero__br { display: none; }

.hero__sub {
  position: relative;
  z-index: 1;
  max-width: 40ch;
  margin-top: clamp(16px, 2.4vh, 24px);
  font-size: 18px;
  line-height: 1.45;
  color: var(--t-low);
  text-wrap: balance;
}

/* the quiet half hands its ink to the loud half while the first shape inks in */
@media (prefers-reduced-motion: no-preference) {
  .hero__quiet { animation: hero-handoff 1700ms var(--ease) both; }
  .hero__loud { animation: hero-ink 1300ms var(--ease) 380ms both; }
}
@keyframes hero-handoff {
  0%, 40% { color: var(--ink); }
  100% { color: var(--t-quiet); }
}
@keyframes hero-ink {
  from { color: var(--t-quiet); transform: translateY(0.12em); }
}

@media (max-width: 900px) {
  .hero__title { font-size: clamp(40px, 6.8vw, 92px); }
  /* Slovak runs longer: the type never grows past the width each half needs to stay on one line */
  .hero__title:lang(sk) { font-size: min(clamp(40px, 6.8vw, 92px), calc((100vw - 2 * var(--gutter)) / 14.6)); }
}

@media (max-width: 560px) {
  .hero { padding-top: 80px; }
  .hero .hero__br { display: inline; }
  .hero__title { font-size: clamp(36px, 10.6vw, 50px); line-height: 1.02; }
  .hero__title:lang(sk) { font-size: min(clamp(32px, 10.6vw, 50px), calc((100vw - 2 * var(--gutter)) / 9.9)); }
  .hero__sub { max-width: 32ch; font-size: 16px; }
  .hero__stage { min-height: 220px; }
}
