/* -------------------------------------------------------- */
/* 🔹 Hero Price Tag                                        */
/* -------------------------------------------------------- */
/* The app icon's tag hanging on a string — a job's price    */
/* now, when it's cheaper and the saving. Same outline as    */
/* the social images (scripts/marketing/generate-social.js). Sized by  */
/* --tag-width in the hero visual's container units, and the */
/* text scales with it                                        */

.price-tag {
  --tag-width: 30cqw;
  --tag-angle: 0deg;
  position: absolute;
  width: var(--tag-width);
  aspect-ratio: 280 / 385;
  transform: rotate(var(--tag-angle));
  transform-origin: 50% 0;
}

/* The string runs from the top of the hole — a quarter of the
   tag's width below its point — straight up past the visual,
   turned back so it hangs plumb whatever the tag's angle */
.price-tag::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% - var(--tag-width) * 0.25);
  width: 1.5px;
  height: 100dvh;
  translate: -50% 0;
  rotate: calc(var(--tag-angle) * -1);
  transform-origin: 50% 100%;
  background-color: color-mix(in srgb, var(--color-primary) 35%, transparent);
}

.price-tag__shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* The wide stroke rounds the corners */
.price-tag__outline,
.price-tag__shadow {
  stroke-width: 30;
  stroke-linejoin: round;
}

.price-tag__outline {
  fill: var(--color-surface);
  stroke: var(--color-surface);
}

.price-tag__shadow {
  fill: var(--color-primary);
  stroke: var(--color-primary);
  opacity: 0.1;
}

.price-tag__body {
  position: absolute;
  inset: 33% 8% 7%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}

.price-tag__name {
  font-size: calc(var(--tag-width) * 0.11);
  font-weight: 500;
  color: var(--color-on-surface-variant);
  text-wrap: balance;
}

.price-tag__price {
  align-self: stretch;
  margin-inline: 6%;
  padding-bottom: calc(var(--tag-width) * 0.03);
  border-bottom: 1px solid var(--color-outline);
  font-size: calc(var(--tag-width) * 0.21);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--color-primary);
}

.price-tag__time {
  margin-top: calc(var(--tag-width) * 0.04);
  font-size: calc(var(--tag-width) * 0.1);
  font-weight: 500;
  color: var(--color-on-surface-variant);
}

.price-tag__saving {
  font-size: calc(var(--tag-width) * 0.105);
  font-weight: 600;
  color: var(--color-secondary);
}


/* -------------------------------------------------------- */
/* 🔹 Placement                                             */
/* -------------------------------------------------------- */
/* In the hero visual's container units, beside the phone   */
/* with a gap at the car tag's lower corner, and inside the */
/* visual's width, so no tag reaches past the page edge     */

/* Its string runs behind the car's tag, clear of the car's hole */
.price-tag--laundry {
  --tag-width: 22cqw;
  --tag-angle: -4deg;
  left: 78cqw;
  top: 62cqw;
}

.price-tag--car {
  --tag-width: 31cqw;
  --tag-angle: 7deg;
  left: 68cqw;
  top: 11cqw;
}

/* Narrow phones — one larger tag keeps the text readable */
@media (max-width: 599px) {
  .price-tag--laundry {
    display: none;
  }

  .price-tag--car {
    --tag-width: 35cqw;
  }
}
