/**
 * Hello Home — landing-page header.
 *
 * Logo left, buttons right, on a white bar. Stands in for the theme header
 * on a page where the site menu is more exit than navigation.
 *
 * Matches the theme's own bar closely enough that the swap is not obvious:
 * 65px tall, logo around 130px wide, small buttons hard right.
 */

/**
 * The theme header goes when this one is present.
 *
 * Safe to put in a stylesheet rather than in page CSS because this file is
 * registered globally but only ENQUEUED when the widget actually renders --
 * so the rule reaches exactly the pages carrying a replacement header, and
 * nothing else. Dropping the widget from a page restores the site header on
 * its own, with nothing to remember to undo.
 *
 * Hiding #masthead is only half of it. The theme header is position: fixed,
 * so it is out of flow and the space for it is reserved by padding on
 * #content -- NOT on body, which is what misled the first version of this
 * rule. Hide the header without clearing that padding and you get 65px of
 * page background above the replacement, which on this site's dark body
 * reads as a black bar.
 */
#masthead {
  display: none;
}

#content.site-content {
  padding-top: 0;
}

.hello-header {
  --hello-pad-y: 0;
  --hello-pad-x: clamp(16px, 3vw, 40px);
  --hello-width: 100%;
  background: var(--hello-bg, #fff);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.hello-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 65px;
}

/* ---- logo --------------------------------------------------------------- */

.hello-header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.hello-header__logo-img {
  display: block;
  width: auto;
  height: 38px;
  /* The theme rounds images in post content; a logo has no corners to round. */
  border-radius: 0;
}

/* ---- buttons ------------------------------------------------------------ */

.hello-header__actions {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 16px);
}

/* Smaller than the page's calls to action: this is chrome, not the pitch. */
.hello-header .hello-btn.hello-header__btn {
  padding: 9px 20px;
  border-width: 2px;
  font-size: 14px;
  white-space: nowrap;
}

/**
 * "Quiet" is the old nav item -- Shop was a menu link, and DC want it as a
 * button without it competing with Get 7 Days Free. Plain text until it is
 * hovered, then it picks up the accent.
 */
.hello-header .hello-btn.hello-header__btn--quiet {
  background: transparent;
  border-color: transparent;
  color: inherit;
}
.hello-header .hello-btn.hello-header__btn--quiet:hover,
.hello-header .hello-btn.hello-header__btn--quiet:focus-visible {
  background: transparent;
  border-color: transparent;
  color: var(--hello-accent);
}

/* ---- optional sticky ---------------------------------------------------- */

.hello-header--sticky {
  position: sticky;
  top: 0;
  z-index: 60;
}

/* ---- narrow ------------------------------------------------------------- */

@media (max-width: 599px) {
  /**
   * The logo shrinks before the buttons do. Losing a call to action costs
   * more than losing a few pixels of wordmark, and at this width the three
   * buttons are already the tighter constraint.
   */
  .hello-header__logo-img {
    height: 30px;
  }
  .hello-header .hello-btn.hello-header__btn {
    padding: 8px 12px;
    font-size: 13px;
  }
  .hello-header__bar {
    min-height: 56px;
  }
}
