/* ==========================================================================
   Reclameworks · hero
   Sticky intro met lijnenspel rond het logo. Bij scrollen zakt hij weg
   onder de volgende sectie (--hero-progress wordt gezet in rw-hero.js).
   ========================================================================== */

.rw-hero {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  background: var(--rw-koolzwart);
}

/* Donker waas dat dichttrekt tijdens het wegscrollen */
.rw-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #000;
  opacity: calc(var(--hero-progress, 0) * .6);
  pointer-events: none;
}

/* Inhoud schuift iets omhoog en wordt iets kleiner tijdens het wegscrollen */
.rw-hero > *:not(canvas) {
  transform: translateY(calc(var(--hero-progress, 0) * -12vh)) scale(calc(1 - var(--hero-progress, 0) * .06));
  transform-origin: 50% 0;
}

.rw-hero-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* Positie en maat worden in rw-hero.js gezet, gelijk aan de lijnen */
.rw-hero-logo {
  position: absolute;
  z-index: 3;
  display: block;
  opacity: 0;
  animation: rw-fade-in .9s var(--ease-out) .1s forwards;
}

html.rw-is-loading .rw-hero * {
  animation-play-state: paused;
}

/* --------------------------------------------------------------------------
   Titel en tekst
   -------------------------------------------------------------------------- */

.rw-hero-body {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: var(--gut);
  right: 24px;
  display: flex;
  flex-direction: column;
  transform: translateY(-72%);
}

.rw-hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: min(200px, calc((100vw - 48px) * .143));
  line-height: .865;
  letter-spacing: -.05em;
  white-space: nowrap;
}

.rw-hero-title span {
  display: block;
  opacity: 0;
  transform: translateY(.2em);
  animation: rw-hero-rise 1.2s var(--ease-out) forwards;
}

/* "designed" als outline, "to work." in blauw */
.rw-hero-title .rw-hero-title-top {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--rw-zacht-grijs);
  animation-delay: .55s;
}

.rw-hero-title .rw-hero-title-bottom {
  color: var(--rw-diepblauw);
  animation-delay: .72s;
}

.rw-hero-copy {
  max-width: 640px;
  margin-top: clamp(40px, min(6.5vw, 8vh), 88px);
  opacity: 0;
  animation: rw-fade-in 1s var(--ease-out) 1.15s forwards;
}

.rw-hero-lead {
  margin: 0 0 12px;
  color: #fff;
  font-weight: 500;
  font-size: clamp(19px, 1.86vw, 26px);
  line-height: 1.3;
  letter-spacing: -.023em;
}

.rw-hero-text {
  margin: 0;
  color: var(--rw-zacht-grijs);
  font-size: clamp(16px, 1.43vw, 20px);
  line-height: 1.55;
  letter-spacing: -.015em;
}

/* --------------------------------------------------------------------------
   Scroll-hint onderin
   -------------------------------------------------------------------------- */

.rw-hero-scroll {
  all: unset;
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: clamp(28px, 5vh, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: max-content;
  margin: 0 auto;
  padding: 12px 0;
  cursor: pointer;
  color: var(--rw-zacht-grijs);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  opacity: 0;
  animation: rw-fade-in .8s var(--ease-out) 1.8s forwards;
}

.rw-hero-scroll:hover {
  color: var(--rw-puur-wit);
}

.rw-hero-scroll:focus-visible {
  outline: 2px solid var(--rw-diepblauw);
  outline-offset: 4px;
}

.rw-hero-scroll-line {
  position: relative;
  display: block;
  width: 1px;
  height: clamp(48px, 8vh, 84px);
  overflow: hidden;
  background: #4a4a4a;
}

.rw-hero-scroll-line b {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 40%;
  background: var(--rw-diepblauw);
  animation: rw-scroll-line 1.8s cubic-bezier(.76, 0, .24, 1) infinite;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (min-width: 701px) {
  .rw-hero-body {
    top: max(150px, 29%);
    transform: none;
  }

  .rw-hero-lead {
    white-space: nowrap;
  }
}

@media (min-width: 1101px) {
  .rw-hero-body {
    top: 25svh;
    bottom: auto;
  }

  .rw-hero-title {
    font-size: 14vw;
  }

  .rw-hero-scroll {
    bottom: 10.2svh;
  }
}

/* Lage laptopschermen (bijv. MacBook Pro 14") */
@media (min-width: 1101px) and (max-height: 950px) {
  .rw-hero-title {
    font-size: min(14vw, 19vh);
  }

  .rw-hero-copy {
    max-width: 600px;
  }
}

@media (min-width: 701px) and (max-width: 1100px) {
  .rw-hero-title {
    font-size: 17.5vw;
  }

  .rw-hero-scroll {
    bottom: 8.3svh;
  }
}

@media (max-width: 700px) {
  .rw-hero {
    min-height: 0;
  }

  .rw-hero-body {
    top: 33.9svh;
    bottom: auto;
    transform: none;
  }

  .rw-hero-title {
    font-size: 19.2vw;
  }

  .rw-hero-title .rw-hero-title-top {
    -webkit-text-stroke-width: 1px;
  }

  .rw-hero-copy {
    margin-top: clamp(24px, 4vh, 40px);
  }

  .rw-hero-lead {
    font-size: 20px;
  }

  .rw-hero-text {
    font-size: 18px;
    line-height: 1.6;
  }

  .rw-hero-scroll {
    bottom: 6svh;
  }
}

@keyframes rw-hero-rise {
  to { opacity: 1; transform: none; }
}

@keyframes rw-scroll-line {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(260%); }
}
