/* Home page showcase: the hero "offers compared" demo and the example-profile strip.
   Loads after style.css. Everything here is illustrative: the markup labels it as examples. */

/* ---------- Hero demo ---------- */
.hd {
  position: relative;
  margin-inline: auto;
  width: 100%;
  max-width: 34rem;
  display: grid;
  gap: 1rem;
}
.hd-profiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.hd-profile,
.hd-offers {
  background: #fff;
  border: 1px solid var(--n200);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.hd-profile {
  animation: hd-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hd-profile:nth-child(2) {
  animation-delay: 0.12s;
}
.hd-profile__cover {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.hd-profile__body {
  position: relative;
  padding: 0 0.85rem 0.85rem;
}
.hd-profile__avatar {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  margin-top: -1.375rem;
  border-radius: 999px;
  border: 3px solid #fff;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
}
.hd-profile__name {
  margin: 0.4rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.15;
  color: var(--n900);
}
.hd-profile__meta {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--n500);
}
.hd-chip {
  position: absolute;
  top: -0.2rem;
  right: 0.85rem;
  transform: translateY(-100%);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgb(23 23 23 / 0.85);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
}
.hd-offers {
  padding: 1.1rem 1.15rem 1rem;
  animation: hd-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}
.hd-offers__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.hd-offers__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--n900);
}
.hd-offers__count {
  font-size: 0.75rem;
  color: var(--n500);
  white-space: nowrap;
}
.hd-rows {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}
.hd-row {
  display: grid;
  grid-template-columns: 5.6rem minmax(0, 1fr) 3.6rem;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
}
.hd-row__who {
  color: var(--n700);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hd-row__total {
  text-align: right;
  font-weight: 600;
  color: var(--n900);
  font-variant-numeric: tabular-nums;
}
.hd-track {
  height: 0.7rem;
  border-radius: 999px;
  background: var(--n100);
  overflow: hidden;
}
.hd-bar {
  display: flex;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
}
.hd-seg {
  height: 100%;
  transform-origin: left center;
  animation: hd-grow 1s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(0.6s + var(--i, 0) * 0.15s);
}
.hd-seg + .hd-seg {
  border-left: 1px solid rgb(255 255 255 / 0.75);
}
.hd-seg--cash {
  background: var(--brand);
}
.hd-seg--product {
  background: #fbbf24;
}
.hd-seg--lt {
  background: #0ea5e9;
}
.hd-best {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.4rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  animation: hd-pop 0.5s ease 1.7s both;
}
.hd-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;
  margin: 0.9rem 0 0;
  padding: 0.7rem 0 0;
  border-top: 1px solid var(--n100);
  font-size: 0.75rem;
  color: var(--n600);
}
.hd-legend span::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.35rem;
  border-radius: 999px;
  background: var(--c, var(--brand));
}
.hd-legend .hd-best::before {
  display: none;
}
.hd-legend .hd-best {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.7rem;
}
.hd-note {
  margin: 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--n400);
}

@keyframes hd-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes hd-grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes hd-pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 1024px) {
  .hd {
    min-height: 31rem;
  }
  .hd-profiles {
    position: relative;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding-inline: 0.5rem;
  }
  .hd-profile:nth-child(1) {
    transform: rotate(-3deg);
    animation-name: hd-in-a;
  }
  .hd-profile:nth-child(2) {
    transform: rotate(2.5deg) translateY(0.6rem);
    animation-name: hd-in-b;
  }
  .hd-profiles {
    padding-bottom: 1.5rem;
  }
  .hd-offers {
    margin-top: -0.5rem;
    position: relative;
    z-index: 2;
  }
}
@keyframes hd-in-a {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(-6deg);
  }
  to {
    opacity: 1;
    transform: rotate(-3deg);
  }
}
@keyframes hd-in-b {
  from {
    opacity: 0;
    transform: translateY(40px) rotate(5deg);
  }
  to {
    opacity: 1;
    transform: rotate(2.5deg) translateY(0.6rem);
  }
}

/* ---------- Example profiles strip ---------- */
.showcase {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 17rem);
  gap: 1rem;
  padding: 0.5rem 1.25rem 1.5rem;
  margin-inline: -1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.showcase > * {
  scroll-snap-align: start;
}
@media (min-width: 1024px) {
  .showcase {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-columns: auto;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
}
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--n200);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.pcard:hover,
.pcard:focus-visible {
  transform: translateY(-4px);
  border-color: rgb(201 42 42 / 0.3);
  box-shadow: var(--shadow-glow);
}
.pcard__cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--brand-50);
}
.pcard__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.pcard:hover .pcard__cover img {
  transform: scale(1.05);
}
.pcard__kind,
.pcard__price {
  position: absolute;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.pcard__kind {
  top: 0.75rem;
  left: 0.75rem;
  background: rgb(255 255 255 / 0.9);
  color: var(--n700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pcard__price {
  right: 0.75rem;
  bottom: 0.75rem;
  background: rgb(23 23 23 / 0.85);
  color: #fff;
}
.pcard__body {
  position: relative;
  padding: 0 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.pcard__avatar {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  margin-top: -1.75rem;
  border-radius: 999px;
  border: 4px solid #fff;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
}
.pcard__name {
  margin: 0.6rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  line-height: 1.15;
  color: var(--n900);
}
.pcard__meta {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--n500);
}
.pcard__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0 0;
}
.pcard__tags span {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 500;
}
.pcard__line {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--n600);
}
.pcard--cta {
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
  border: 2px dashed rgb(201 42 42 / 0.35);
  background: linear-gradient(160deg, var(--brand-50), #fff);
  box-shadow: none;
}
.pcard--cta .pcard__name {
  margin-top: 0.9rem;
}
.pcard__plus {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  box-shadow: var(--shadow-glow);
  transition: transform 0.3s ease;
}
.pcard--cta:hover .pcard__plus {
  transform: rotate(90deg) scale(1.08);
}
.showcase-note {
  margin: 1.25rem auto 0;
  max-width: 40rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--n500);
}

@media (prefers-reduced-motion: reduce) {
  .hd-profile,
  .hd-offers,
  .hd-seg,
  .hd-best {
    animation: none !important;
  }
  .pcard,
  .pcard__cover img {
    transition: none;
  }
}
