/* ============================================================
   PRISMA · prisma-cards.css
   Card family — Master, Blog, Pricing, Testimonial, CTA.
   Token-driven, correct in BOTH themes. Depth from borders
   (dark) / soft shadows (light). Load AFTER colors_and_type.css
   and prisma-components.css.
   ============================================================ */

/* ─── Shared: avatar ──────────────────────────────────── */
.av {
  flex-shrink: 0; display: grid; place-items: center; border-radius: 50%;
  width: 40px; height: 40px; font-family: var(--font-body); font-weight: 600;
  font-size: 14px; color: var(--fg-reverse); letter-spacing: -0.01em;
  background: linear-gradient(140deg, var(--teal-400), var(--teal-600));
  overflow: hidden; user-select: none;
}
.av.sm { width: 30px; height: 30px; font-size: 11px; }
.av.lg { width: 52px; height: 52px; font-size: 17px; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.alt { background: linear-gradient(140deg, var(--teal-300), var(--teal-500)); }

/* ============================================================
   1 · MASTER CARD — the wildcard. header · body · footer.
   ============================================================ */
.mcard {
  position: relative;
  display: flex; flex-direction: column; gap: var(--gap-4);
  width: 340px; max-width: 100%; box-sizing: border-box;
  background: var(--bg-neutral-weak); border: 1px solid var(--stroke);
  border-radius: var(--radius-high); padding: 20px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.mcard.elevated { background: var(--bg); box-shadow: var(--shadow); }
[data-theme="dark"] .mcard.elevated { box-shadow: none; border-color: var(--stroke-strong); }
.mcard.brand { border-color: var(--stroke-ppg); box-shadow: var(--shadow-glow-teal); }
.mcard.interactive { cursor: pointer; }
.mcard.interactive:hover { border-color: var(--stroke-strong); transform: translateY(-2px); }
.mcard.brand.interactive:hover { border-color: var(--fg-ppg); }

/* status badge, inset in the upper-right corner (only shown when the header
   has no icon — the two are mutually exclusive) */
.mcard-badge { position: absolute; top: 18px; right: 18px; z-index: 2; }
.mcard:has(.mcard-badge) .mcard-headtext { padding-right: 70px; }

/* header */
.mcard-head { display: flex; align-items: flex-start; gap: 12px; }
.mcard-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: var(--radius);
  display: grid; place-items: center; font-size: 20px;
  background: var(--bg-ppg); color: var(--fg-ppg); border: 1px solid var(--stroke-ppg-weak);
}
.mcard.brand .mcard-icon { background: var(--bg-ppg-strong); }
.mcard-headtext { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.mcard-titlerow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mcard-title {
  font-family: var(--font-display); font-variation-settings: var(--mona-heading);
  font-weight: 700; font-size: var(--text-md); line-height: 1.25; color: var(--fg);
  letter-spacing: 0; margin: 0;
}
.mcard-sub { font-family: var(--font-body); font-size: var(--text-sm); line-height: 1.4; color: var(--fg-weak); }
.mcard-head .mcard-menu { margin-left: auto; flex-shrink: 0; }

/* body */
.mcard-body { display: flex; flex-direction: column; gap: 14px; }
.mcard-text { font-family: var(--font-body); font-size: var(--text-sm); line-height: 1.55; color: var(--fg-weak); margin: 0; text-wrap: pretty; }
.mcard-person { display: flex; align-items: center; gap: 11px; }
.mcard-person-meta { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mcard-name { font-family: var(--font-body); font-weight: 600; font-size: var(--text-sm); color: var(--fg); line-height: 1.3; }
.mcard-personsub { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--fg-weaker); letter-spacing: .02em; }

/* media slot (optional) */
.mcard-media {
  height: 140px; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-neutral-weaker); border: 1px solid var(--stroke);
  position: relative; display: grid; place-items: center;
}

/* footer */
.mcard-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mcard-foot.end { justify-content: flex-end; }
.mcard-foot.stretch > .pbtn { flex: 1; }
.mcard-foot .spacer { margin-left: auto; }
.mcard-divider { height: 1px; background: var(--stroke); margin: 0; border: 0; }

/* ============================================================
   2 · BLOG CARD — media + meta + title + author.
   ============================================================ */
.blogcard {
  display: flex; flex-direction: column; overflow: hidden;
  width: 340px; max-width: 100%; box-sizing: border-box;
  background: var(--bg-neutral-weak); border: 1px solid var(--stroke);
  border-radius: var(--radius-high);
  transition: border-color .15s ease, transform .15s ease;
}
.blogcard.interactive { cursor: pointer; }
.blogcard.interactive:hover { border-color: var(--stroke-strong); transform: translateY(-2px); }
.blog-media {
  position: relative; aspect-ratio: 16 / 9; flex-shrink: 0;
  background: var(--bg-neutral-weaker); border-bottom: 1px solid var(--stroke);
  overflow: hidden; display: grid; place-items: center;
}
.blog-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* gradient stand-in for a cover image (symbolises the photo without hand-drawn art) */
.blog-media-ph {
  position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(120% 120% at 18% 12%, color-mix(in srgb, var(--teal-300) 70%, transparent), transparent 55%),
    linear-gradient(135deg, var(--teal-400) 0%, var(--teal-600) 42%, var(--teal-900) 100%);
}
[data-theme="light"] .blog-media-ph {
  background:
    radial-gradient(120% 120% at 18% 12%, color-mix(in srgb, var(--teal-200) 80%, transparent), transparent 55%),
    linear-gradient(135deg, var(--teal-300) 0%, var(--teal-500) 45%, var(--teal-700) 100%);
}
.blog-media-glyph { position: absolute; font-size: 40px; color: rgba(255,255,255,.42); }
.blog-media-tag {
  position: relative; z-index: 1; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  color: #fff; background: rgba(3,7,18,.32); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  padding: 4px 9px; border-radius: var(--radius-full); border: 1px solid rgba(255,255,255,.22);
}
.blog-body { display: flex; flex-direction: column; gap: 12px; padding: 18px; flex: 1; }
.blog-meta { display: flex; align-items: center; gap: 10px; }
.blog-date { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--fg-weaker); letter-spacing: .02em; }
.blog-title {
  font-family: var(--font-display); font-variation-settings: var(--mona-heading);
  font-weight: 700; font-size: var(--text-lg); line-height: 1.25; color: var(--fg);
  letter-spacing: -0.01em; margin: 0; text-wrap: pretty;
}
.blogcard.interactive:hover .blog-title { color: var(--fg-ppg); }
.blog-excerpt { font-family: var(--font-body); font-size: var(--text-sm); line-height: 1.55; color: var(--fg-weak); margin: 0; text-wrap: pretty; }
.blog-author { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 4px; }
.blog-author-meta { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.blog-author-name { font-family: var(--font-body); font-weight: 600; font-size: var(--text-xs); color: var(--fg); line-height: 1.4; }
.blog-author-role { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-weaker); letter-spacing: .03em; }

/* horizontal: media beside body */
.blogcard.horizontal { flex-direction: row; width: 560px; align-items: stretch; }
.blogcard.horizontal .blog-media { aspect-ratio: auto; width: 200px; flex-shrink: 0; border-bottom: 0; border-right: 1px solid var(--stroke); }
.blogcard.horizontal .blog-body { justify-content: center; }

/* featured: large, media left ~half */
.blogcard.featured { flex-direction: row; width: 760px; align-items: stretch; }
.blogcard.featured .blog-media { aspect-ratio: auto; width: 46%; flex-shrink: 0; border-bottom: 0; border-right: 1px solid var(--stroke); }
.blogcard.featured .blog-body { padding: 28px; gap: 16px; justify-content: center; }
.blogcard.featured .blog-title { font-size: var(--text-2xl); line-height: 1.2; }

/* ============================================================
   3 · PRICING CARD — plan · price · cta · features.
   ============================================================ */
.pricecard {
  position: relative; display: flex; flex-direction: column; gap: 20px;
  width: 340px; max-width: 100%; box-sizing: border-box;
  background: var(--bg-neutral-weak); border: 1px solid var(--stroke);
  border-radius: var(--radius-xl); padding: 28px 24px;
}
.pricecard.popular { border-color: var(--stroke-ppg); box-shadow: var(--shadow-glow-teal); }
.price-flag {
  position: absolute; top: -11px; left: 24px;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--fg-reverse);
  background: var(--bg-ppg-reverse-strong); padding: 4px 12px; border-radius: var(--radius-full);
}
.price-flag i { font-size: 12px; }
.price-head { display: flex; flex-direction: column; gap: 6px; }
.price-name {
  font-family: var(--font-display); font-variation-settings: var(--mona-heading);
  font-weight: 700; font-size: var(--text-xl); color: var(--fg); letter-spacing: 0; margin: 0;
}
.price-tag { font-family: var(--font-body); font-size: var(--text-sm); color: var(--fg-weak); line-height: 1.4; }
.price-amount { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.price-amount .amt {
  font-family: var(--font-display); font-variation-settings: var(--mona-display);
  font-weight: 900; font-size: var(--text-5xl); line-height: 1; color: var(--fg); letter-spacing: -0.03em;
}
.price-amount .amt.sm { font-size: var(--text-3xl); letter-spacing: -0.02em; }
.price-amount .per { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--fg-weaker); }
.price-divider { height: 1px; background: var(--stroke); border: 0; margin: 0; }
.price-feats { display: flex; flex-direction: column; gap: 11px; }
.price-feats .lead { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; color: var(--fg-weak); }
.price-feat { display: flex; align-items: flex-start; gap: 10px; font-family: var(--font-body); font-size: var(--text-sm); line-height: 1.45; color: var(--fg); }
.price-feat i { flex-shrink: 0; margin-top: 2px; font-size: 15px; color: var(--fg-ppg); }
.price-feat.muted { color: var(--fg-weaker); }
.price-feat.muted i { color: var(--fg-weaker); }
.price-note { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--fg-weaker); line-height: 1.5; }

/* extra product/add-on section — only on the taller tier */
.price-addon {
  display: flex; flex-direction: column; gap: 11px;
  margin-top: 4px; padding: 16px; border-radius: var(--radius-high);
  background: var(--bg-ppg); border: 1px solid var(--stroke-ppg-weak);
}
.price-addon-hd { display: flex; align-items: center; gap: 11px; }
.price-addon-ic {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: var(--radius);
  display: grid; place-items: center; font-size: 18px;
  background: var(--bg-ppg-strong); color: var(--fg-ppg); border: 1px solid var(--stroke-ppg-weak);
}
.price-addon-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.price-addon-name { font-family: var(--font-body); font-weight: 600; font-size: var(--text-sm); color: var(--fg); line-height: 1.25; }
.price-addon-tag { font-family: var(--font-body); font-size: var(--text-xs); color: var(--fg-weak); line-height: 1.35; }
.price-addon .price-feat { font-size: var(--text-xs); }
.price-addon .price-note { margin-top: 2px; }

/* ============================================================
   4 · TESTIMONIAL CARD — quote · author.
   ============================================================ */
.tcard {
  display: flex; flex-direction: column; gap: 24px;
  width: 380px; max-width: 100%; box-sizing: border-box;
  background: var(--bg-neutral-weak); border: 1px solid var(--stroke);
  border-radius: var(--radius-high); padding: 28px;
}
.tcard.brand { border-color: var(--stroke-ppg); background: var(--bg-ppg); }
.tcard-mark { font-family: var(--font-display); font-variation-settings: var(--mona-display);
  font-weight: 900; font-size: 44px; line-height: .6; color: var(--fg-ppg); height: 22px; }
.tcard-quote {
  font-family: var(--font-display); font-variation-settings: var(--mona-heading);
  font-weight: 700; font-size: var(--text-xl); line-height: 1.4; color: var(--fg);
  letter-spacing: -0.01em; margin: 0; text-wrap: pretty;
}
.tcard-stars { display: flex; gap: 2px; color: var(--fg-ppg); font-size: 15px; }
.tcard-author { display: flex; align-items: center; gap: 13px; margin-top: auto; }
.tcard-author-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tcard-author-name { font-family: var(--font-body); font-weight: 600; font-size: var(--text-sm); color: var(--fg); }
.tcard-author-role { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--fg-weaker); letter-spacing: .04em; text-transform: uppercase; }
.tcard-author-role .co { color: var(--fg-ppg); }

/* ============================================================
   5 · CTA CARD — eyebrow · title · desc · actions.
   ============================================================ */
.ctacard {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
  width: 560px; max-width: 100%; box-sizing: border-box;
  background: var(--bg-neutral-weak); border: 1px solid var(--stroke);
  border-radius: var(--radius-xl); padding: 36px 40px;
}
.ctacard.center { align-items: center; text-align: center; }
.ctacard.brand { border-color: var(--stroke-ppg); background:
  radial-gradient(120% 140% at 0% 0%, var(--bg-ppg-strong), var(--bg-neutral-weak) 60%); }
.ctacard.brand::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 240px; height: 240px;
  background: radial-gradient(circle, var(--bg-ppg-reverse) 0%, transparent 68%);
  opacity: .14; pointer-events: none;
}
.cta-eyebrow { position: relative; }
.cta-title {
  position: relative; font-family: var(--font-display); font-variation-settings: var(--mona-heading);
  font-weight: 700; font-size: var(--text-3xl); line-height: 1.15; color: var(--fg);
  letter-spacing: -0.015em; margin: 0; text-wrap: balance; max-width: 22ch;
}
.cta-desc { position: relative; font-family: var(--font-body); font-size: var(--text-md); line-height: 1.55; color: var(--fg-weak); margin: 0; max-width: 46ch; text-wrap: pretty; }
.cta-actions { position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

@media (max-width: 560px) {
  .blogcard.horizontal, .blogcard.featured { flex-direction: column; width: 340px; }
  .blogcard.horizontal .blog-media, .blogcard.featured .blog-media {
    width: 100%; aspect-ratio: 16 / 9; border-right: 0; border-bottom: 1px solid var(--stroke);
  }
  .ctacard { padding: 28px 24px; }
}
