/* Viviano Flower Shop: the home page. The staircase comes from site.css; this adds what each tread holds, top to bottom. */

/* Room at the foot for the budget ribbon while it is out. */
body { padding-bottom: calc(var(--ribbon-tall) + var(--budget-tall, 0rem)); }

/* Tread 0: the card photograph under the first sentence, its words below on a phone and hard against its right edge on a wide screen. */
.vis-first-photo img,
.vis-first-photo video { aspect-ratio: 16 / 9; }
.vis-first-words { font-size: var(--read-size); line-height: 1.55; }
@media (min-width: 56em) {
  .vis-first-photo {
    display: grid;
    grid-template-columns: min(66%, calc(56vh * 16 / 9)) minmax(0, 1fr);
    column-gap: 0.75rem;
    align-items: end;
  }
  .vis-first-words {
    max-width: none;
    margin-top: 0;
    font-size: 1.25rem;
    line-height: 1.5;
  }
}

/* Every tread: a little air between the reading text and what follows it. */
.vis-stair .vis-read + p,
.vis-stair .vis-read + .vis-read { margin-top: 0.75rem; }

/* Tread 1: three catalog designs with their published prices. No boxes, no rules. */
.vis-priced {
  max-width: var(--read-wide);
  margin-block: 1.25rem;
}
.vis-priced li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1rem;
  align-items: center;
  padding-bottom: 0.6rem;
}
.vis-priced a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  justify-self: start;
}
.vis-priced-sum { color: var(--sunflower); white-space: nowrap; }
.vis-priced-kind {
  grid-column: 1 / -1;
  font-size: var(--small-size);
  line-height: 1.4;
}

/* Tread 3: two counter scenes, the second one step farther right. */
.vis-scene { margin-top: 2.25rem; }
.vis-scene-deeper { margin-left: var(--photo-shift); }
@media (min-width: 56em) {
  .vis-scene > .vis-photo { margin-top: 0.5rem; }
}

/* Treads 4 and 5: the deeper steps keep the budget block's picture measure, so the photographs do not shrink as the stair descends. */
@media (min-width: 56em) {
  .vis-stair[data-tread="4"] > .vis-beside,
  .vis-stair[data-tread="5"] > .vis-beside {
    grid-template-columns: minmax(0, 1fr) calc((100vw - var(--first-inset) - var(--tread-deep) - var(--right-keep) - var(--photo-shift)) * 4 / 9);
  }
}

/* Tread 5: five towns stacked in DM Mono on one left edge under the bar; the market is noted apart. */
.vis-towns {
  margin-block: 1.25rem 1.5rem;
  font-size: 1.125rem;
  line-height: 1.4;
}
.vis-towns li {
  margin-left: 0;
  padding-block: 0.3rem;
}
.vis-towns span {
  display: block;
  font-size: var(--small-size);
  color: var(--sunflower);
}
.vis-apart { font-size: var(--small-size); line-height: 1.55; }
@media (min-width: 48em) {
  .vis-towns { font-size: 1.3125rem; }
}

/* Tread 6: the white enclosure card with the number on it, set down before the sunflower card at the foot. */
.vis-kept {
  margin-top: 2rem;
  margin-left: var(--photo-shift);
  font-size: var(--read-size);
}
.vis-kept a { display: inline-block; padding-block: 0.6rem; }
@media (min-width: 56em) {
  .vis-kept { margin-top: 3.5rem; margin-left: 0; }
}

/* The budget ribbon: tucked off the left edge until the card photograph has left the window, then eased in along the bottom. */
.vis-ribbon {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--ribbon-tall) * 1.08);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.25rem 0.1rem 1rem;
  background: var(--sunflower);
  color: var(--blackberry);
  font-size: var(--small-size);
  line-height: 1.35;
  transform: translateX(-102%);
  opacity: 0;
  visibility: hidden;
  transition: transform var(--slow-ease), opacity var(--slow-ease), visibility 0s linear 800ms;
}
.vis-ribbon[data-state="out"] {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition: transform var(--slow-ease), opacity var(--slow-ease), visibility 0s;
}
.vis-ribbon p { flex: 1 1 auto; }
.vis-ribbon a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration-color: var(--blackberry);
}
.vis-ribbon a:hover { color: var(--raspberry); }
.vis-ribbon a:focus-visible { outline-color: var(--blackberry); }
@media (min-width: 48em) {
  .vis-ribbon {
    right: auto;
    max-width: 36rem;
    padding: 0.25rem 0.75rem 0.25rem var(--first-inset);
  }
}

/* The cookie plate keeps clear of both ribbons on narrow screens; on the widest it sits to the right of them as before. */
#agree { bottom: calc(var(--ribbon-tall) * 1.08 + var(--budget-tall, 0rem) + 0.75rem); }
@media (min-width: 70em) {
  #agree { bottom: 1.25rem; }
}

/* Reduced motion: the ribbon is simply there or not. */
@media (prefers-reduced-motion: reduce) {
  .vis-ribbon, .vis-ribbon[data-state="out"] { transition: none; }
}
