/**
 * Home of the Month card (see development-hotm.php).
 *
 * Plain CSS, enqueued only on a development page whose card is showing, and
 * scoped under .dev-hotm. The same cream card with an amber top edge and crimson
 * hexagon as the event panel. It sits in the text column of the overview, so
 * whether the photo goes above or beside the text is decided by the card's own
 * width (a container), not the screen's. The card is the container and
 * .dev-hotm__inner is what the container query lays out, because a container
 * query cannot restyle the container itself.
 *
 * Fonts (Avenir) are registered by the theme in includes/fonts.php.
 */

.dev-hotm {
  --hotm-cream: #FFF4E0;
  --hotm-amber: #F9B233;
  --hotm-crimson: #EA5151;
  --hotm-grey: #5F5F5F;
  --hotm-heavy: 'AvenirLTStd-Heavy', helvetica, arial, sans-serif;
  --hotm-roman: 'AvenirLTStd-Roman', helvetica, arial, sans-serif;

  container-type: inline-size;
  margin: 32px 0;
  overflow: hidden;
  border-top: 6px solid var(--hotm-amber);
  border-radius: 14px;
  background: var(--hotm-cream);
  color: var(--hotm-grey);
  font-family: var(--hotm-roman);
  scroll-margin-top: 150px; /* clear of the sticky header */
  text-align: left;
}

.dev-hotm *,
.dev-hotm *::before,
.dev-hotm *::after {
  box-sizing: border-box;
}

.dev-hotm p,
.dev-hotm ul {
  margin: 0;
  padding: 0;
}

.dev-hotm .dev-hotm__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Photo -------------------------------------------------------------- */
.dev-hotm .dev-hotm__media {
  aspect-ratio: 16 / 9;
  background: #e9dcc2;
}

.dev-hotm .dev-hotm__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Text --------------------------------------------------------------- */
.dev-hotm .dev-hotm__body {
  padding: 18px;
}

.dev-hotm .dev-hotm__eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--hotm-crimson);
  color: #fff;
  font-family: var(--hotm-heavy);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dev-hotm .dev-hotm__head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dev-hotm .dev-hotm__plot {
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 86.6px;
  height: 100px;
  color: #fff;
  font-family: var(--hotm-heavy);
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.dev-hotm .dev-hotm__hex {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.dev-hotm .dev-hotm__hex polygon {
  fill: var(--hotm-crimson);
}

.dev-hotm .dev-hotm__plot-label,
.dev-hotm .dev-hotm__plot-number {
  position: relative;
}

.dev-hotm .dev-hotm__plot-label {
  font-size: 13px;
  letter-spacing: 0.12em;
}

.dev-hotm .dev-hotm__plot-number {
  margin-top: 3px;
  font-size: 34px;
}

.dev-hotm .dev-hotm__heading {
  margin: 0;
  color: var(--hotm-grey);
  font-family: var(--hotm-heavy);
  font-size: 24px;
  font-weight: normal;
  line-height: 1.15;
}

.dev-hotm .dev-hotm__price {
  margin-top: 4px;
  color: var(--hotm-crimson);
  font-family: var(--hotm-heavy);
  font-size: 22px;
  line-height: 1.2;
}

.dev-hotm .dev-hotm__price-label {
  display: block;
  margin-bottom: 2px;
  color: var(--hotm-grey);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---- Specs and offer ---------------------------------------------------- */
.dev-hotm .dev-hotm__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.3;
  list-style: none;
}

.dev-hotm .dev-hotm__specs li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dev-hotm .dev-hotm__specs i {
  margin-right: 4px;
  color: var(--hotm-crimson);
}

.dev-hotm .dev-hotm__badge {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 14px;
  border: 2px solid var(--hotm-crimson);
  border-radius: 999px;
  color: var(--hotm-crimson);
  font-family: var(--hotm-heavy);
  font-size: 14px;
  line-height: 1.25;
}

.dev-hotm .dev-hotm__action {
  margin-top: 16px;
}

/* The theme colours links inside .content-block with a selector of its own
   (0,3,1), so the button's is longer to win without !important. */
.dev-hotm .dev-hotm__body .dev-hotm__action a.dev-hotm__button {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--hotm-crimson);
  color: #fff;
  font-family: var(--hotm-heavy);
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
}

.dev-hotm .dev-hotm__body .dev-hotm__action a.dev-hotm__button:hover,
.dev-hotm .dev-hotm__body .dev-hotm__action a.dev-hotm__button:focus-visible {
  background: var(--hotm-amber);
  color: var(--hotm-grey);
}

.dev-hotm .dev-hotm__body .dev-hotm__action a.dev-hotm__button:focus-visible {
  outline: 2px solid var(--hotm-grey);
  outline-offset: 2px;
}

.dev-hotm a {
  color: inherit;
}

.dev-hotm .dev-hotm__small {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.4;
}

/* Photo beside the text where the card is wide enough, filling its height */
@container (min-width: 560px) {
  .dev-hotm .dev-hotm__inner {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }

  /* The photo fills its cell, whatever height the text makes the row */
  .dev-hotm .dev-hotm__media {
    position: relative;
    aspect-ratio: auto;
    min-height: 240px;
  }

  .dev-hotm .dev-hotm__img {
    position: absolute;
    top: 0;
    left: 0;
  }

  .dev-hotm .dev-hotm__body {
    padding: 24px;
  }

  .dev-hotm .dev-hotm__heading {
    font-size: 28px;
  }

  .dev-hotm .dev-hotm__price {
    font-size: 24px;
  }
}

/* No photo: the text takes the full width */
@container (min-width: 560px) {
  .dev-hotm .dev-hotm__inner--text {
    display: block;
  }
}

/* ---- The pill in the banner, linking down to the card ------------------- */
.dev-hotm-pillrow {
  margin: 12px 0 0;
}

.dev-hotm-pillrow .dev-hotm-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 22px;
  background: #FFF4E0;
  color: #5F5F5F;
  font-family: 'AvenirLTStd-Heavy', helvetica, arial, sans-serif;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
}

.dev-hotm-pillrow .dev-hotm-pill__label {
  padding: 4px 10px;
  border-radius: 999px;
  background: #EA5151;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dev-hotm-pillrow .dev-hotm-pill:hover,
.dev-hotm-pillrow .dev-hotm-pill:focus-visible {
  background: #F9B233;
  color: #5F5F5F;
}

.dev-hotm-pillrow .dev-hotm-pill:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Below 520px the longest plot (about 460px on one line, in a banner column
   that is the screen less 46px) no longer fits, so the pill is laid out as two
   lines on purpose rather than left to wrap: the label on top, the plot below
   in line with the label's edge and the arrow at the end of that line, in a
   tighter corner. This one is the screen's width, not a container's, because
   it is the banner's column that the pill has to fit. */
@media (max-width: 519px) {
  .dev-hotm-pillrow .dev-hotm-pill {
    display: inline-grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 6px 10px;
    max-width: 100%;
    padding: 8px 14px 9px 8px;
    border-radius: 12px;
  }

  .dev-hotm-pillrow .dev-hotm-pill__label {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .dev-hotm-pillrow .dev-hotm-pill__what {
    padding-left: 4px;
  }
}
