/* Engagement types: the assoc.one smoke backdrop behind the cards (see js/smoke.js).
   Loaded after bring.css, which holds the cards' layout and open/close motion. */
.offers-wrap {
  position: relative;
  padding: 105px 0;
  /* At least a screen tall with the cards in the middle. */
  min-height: 100vh;
  min-height: 100svh;
  align-content: center;
}
/* The label sits on the smoke, so it is white and stays above it. */
.offers-head {
  position: relative;
}

/* The backdrop is pinned to the viewport, not the section, so it has no edge to show: the cards
   scroll over it and smoke.js fades it in as they arrive and out as they leave. It sits at a
   negative z-index in the page's own stacking context, so it is behind every section and shows
   only where they are transparent. */
.smoke {
  position: fixed;
  z-index: -1;
  inset: 0;
  width: 100%;
  /* The large viewport, so the mobile address bar showing and hiding does not resize the canvas. */
  height: 100vh;
  height: 100lvh;
  display: block;
  opacity: 0;
  pointer-events: none;
  background: #000;
}
/* Cards as in the frame: the closed ones are outlines over the smoke, the open one is paper. */
.offer {
  background: transparent;
  transition:
    flex-grow 0.7s var(--ease),
    border-radius 0.7s var(--ease),
    background-color 0.5s var(--ease),
    color 0.5s var(--ease);
}
.offer.is-open {
  background: var(--paper);
  color: var(--ink);
}

/* Inside a card: the description and its detail line sit together at the top; the fees sit at
   the bottom (bring.css spaces the two apart). */
.offer .desc {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.offer .fees {
  margin: 0;
  max-width: 420px;
  font-family: var(--font-utility);
  font-size: 14px;
  line-height: 1.4;
}
.offer .fees > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
}
.offer .fees > div:last-child {
  padding-bottom: 0;
}
.offer .fees dt {
  color: var(--chip-solid);
}
.offer .fees dd {
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

/* Stacked layout: the open card is as tall as its words, not the 520px bring.css leaves for
   the desktop proportions. Each card has its own height, because the fees make Delivery the
   longest. Heights are the measured content (title, description, detail line, fees) at the
   widest wrap in each step, plus 30px of slack above 560px and 50px below, for air. */
@media (max-width: 900px) {
  .offer.is-open {
    height: var(--open-h);
  }
  .offer[data-mode="advisory"] {
    --open-h: 375px;
  }
  .offer[data-mode="fractional"] {
    --open-h: 330px;
  }
  .offer[data-mode="delivery"] {
    --open-h: 400px;
  }
}
@media (max-width: 640px) {
  .offer[data-mode="delivery"] {
    --open-h: 430px;
  }
}
/* Phones: 16px at the sides and 24px top and bottom (bring.css has 28px all round for the
   stacked layout). */
@media (max-width: 560px) {
  .offer {
    --pad: 16px;
  }
  .offer-inner {
    padding: 24px var(--pad);
  }
  .offer[data-mode="advisory"] {
    --open-h: 412px;
  }
  .offer[data-mode="fractional"] {
    --open-h: 387px;
  }
  .offer[data-mode="delivery"] {
    --open-h: 440px;
  }
}
@media (max-width: 420px) {
  .offer[data-mode="advisory"] {
    --open-h: 432px;
  }
  .offer[data-mode="delivery"] {
    --open-h: 486px;
  }
}
@media (max-width: 370px) {
  .offer[data-mode="advisory"] {
    --open-h: 458px;
  }
  .offer[data-mode="fractional"] {
    --open-h: 432px;
  }
  .offer[data-mode="delivery"] {
    --open-h: 505px;
  }
}
@media (max-width: 345px) {
  .offer[data-mode="fractional"] {
    --open-h: 471px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .offer {
    transition-duration: 0.001ms !important;
  }
}
