/**
 * Hello Home — sticky offer bar.
 *
 * Fixed to the foot of the viewport, translated out of view until the
 * visitor has scrolled past the hero. Transform rather than display, so it
 * slides rather than appearing, and so it costs nothing to animate.
 */

.hello-offer-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 900;
  background: #0d0d0d;
  border-top: 1px solid #262626;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(110%);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  /* Keeps the bar clear of the iOS home indicator. */
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.hello-offer-bar.is-shown {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hello-offer-bar {
    transition: none;
  }
}

.hello-offer-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.4vw, 32px);
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px clamp(16px, 3vw, 40px);
  box-sizing: border-box;
}

/* ---- member faces ------------------------------------------------------- */

.hello-offer-bar__faces {
  display: flex;
  align-items: center;
  padding-left: 10px; /* offsets the first face's negative margin */
}

.hello-offer-bar__face {
  display: block;
  width: 52px;
  height: 52px;
  margin-left: -10px; /* overlap */
  border: 2px solid #0d0d0d;
  border-radius: 50%;
  object-fit: cover;
  background: #1a1a1a;
}

/* ---- copy --------------------------------------------------------------- */

.hello-offer-bar__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}

.hello-offer-bar__offer {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
}

.hello-offer-bar__lead {
  color: var(--hello-accent);
}

.hello-offer-bar__dash {
  color: #8a8a8a;
  font-weight: 500;
}

.hello-offer-bar__strap {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #b8b8b8;
}

/* ---- call to action ----------------------------------------------------- */

.hello-offer-bar__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 32px;
  border-radius: 8px;
  background: var(--hello-accent);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}
.hello-offer-bar__cta:hover,
.hello-offer-bar__cta:focus-visible {
  background: var(--hello-accent-dark);
  color: #fff;
  text-decoration: none;
}

/* ---- dismiss ------------------------------------------------------------ */

.hello-offer-bar__close {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 8px;
  right: 10px;
  width: 30px;
  height: 30px;
  padding: 0;
  background: transparent;
  border: 0;
  color: #8a8a8a;
  cursor: pointer;
  transition: color 0.15s ease;
}
.hello-offer-bar__close:hover,
.hello-offer-bar__close:focus-visible {
  color: #fff;
  outline: none;
}
.hello-offer-bar__close::before,
.hello-offer-bar__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.hello-offer-bar__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.hello-offer-bar__close::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* ---- mobile -------------------------------------------------------------
 * Something has to give on a phone: faces, strap and button together do not
 * fit on one line. The strap goes rather than the faces -- the faces are the
 * social proof the bar exists for, while "(billed annually) access
 * everything" largely restates what the offer line already says, and the
 * full terms are on the pricing section anyway.
 * ------------------------------------------------------------------------ */

@media (max-width: 767px) {
  .hello-offer-bar__inner {
    gap: 12px;
    padding: 12px 44px 12px 16px; /* right padding clears the close button */
  }
  .hello-offer-bar__face {
    width: 40px;
    height: 40px;
  }
  .hello-offer-bar__cta {
    height: 46px;
    padding: 0 22px;
    font-size: 16px;
  }
}

@media (max-width: 559px) {
  .hello-offer-bar__strap {
    display: none;
  }
  /* Tighter overlap keeps five faces inside ~130px. */
  .hello-offer-bar__face {
    width: 34px;
    height: 34px;
    margin-left: -12px;
  }
  .hello-offer-bar__inner {
    gap: 10px;
    padding-right: 40px;
  }
  .hello-offer-bar__offer {
    font-size: 17px;
  }
  .hello-offer-bar__cta {
    height: 44px;
    padding: 0 16px;
    font-size: 15px;
  }
}
