/* ==========================================================================
   PRISM — Portfolio page (page-specific; shared components live in
   components.css / sections.css and are reused here, not redefined)
   ========================================================================== */

/* ---------------------------------------------------------------------- */
/* Page hero (centered, lighter than the homepage hero — no glass console) */
/* ---------------------------------------------------------------------- */
.portfolio-hero {
  padding-top: clamp(2rem, 4vw, 4rem);
  padding-bottom: var(--space-8);
  position: relative;
  overflow: clip;
  text-align: center;
}



.portfolio-hero__inner { position: relative; z-index: 1; max-width: 820px; margin-inline: auto; }
.portfolio-hero__badge { margin-bottom: var(--space-5); }
.portfolio-hero__title { margin-bottom: var(--space-5); }
.portfolio-hero__sub { font-size: var(--fs-lead); color: var(--ink-500); max-width: 54ch; margin-inline: auto; }

/* This hero is much shorter/narrower than the homepage hero, so the same
   large hero blobs (sized for that bigger canvas) read as a harsh, muddy
   two-tone wash here rather than a soft ambient accent — scale them down
   and soften them specifically for this section. */
.portfolio-hero .bg-mesh__blob--1 { width: 360px; height: 360px; top: -120px; right: -80px; opacity: 0.32; }
.portfolio-hero .bg-mesh__blob--2 { width: 300px; height: 300px; bottom: -140px; left: -100px; opacity: 0.26; }
[data-theme="dark"] .portfolio-hero .bg-mesh__blob--1 { opacity: 0.22; }
[data-theme="dark"] .portfolio-hero .bg-mesh__blob--2 { opacity: 0.18; }
@media (max-width: 640px) {
  .portfolio-hero .bg-mesh__blob--1 { width: 240px; height: 240px; top: -70px; right: -60px; opacity: 0.28; }
  .portfolio-hero .bg-mesh__blob--2 { width: 200px; height: 200px; bottom: -90px; left: -70px; opacity: 0.22; }
}

/* ---------------------------------------------------------------------- */
/* Live Agent Demos                                                        */
/* ---------------------------------------------------------------------- */
.demos__grid { grid-template-columns: repeat(3, 1fr); }
.demo-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.demo-card__media {
  position: relative;
  aspect-ratio: 3 / 2; /* matches the uploaded demo screenshots exactly — no cropping */
  background: var(--brand-gradient-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.demo-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.demo-card__media-icon { width: 25%; height: 25%; color: var(--brand-indigo); opacity: 0.45; }
[data-theme="dark"] .demo-card__media-icon { color: var(--brand-aqua); }
.demo-card__live {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: rgba(15, 14, 22, 0.55);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.demo-card__live .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.35);
}
.demo-card__body { padding: var(--space-5); display: flex; flex-direction: column; flex-grow: 1; }
.demo-card__industry {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-indigo);
  background: var(--brand-gradient-soft);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
}
[data-theme="dark"] .demo-card__industry { color: var(--brand-aqua); }
.demo-card__name { margin-bottom: var(--space-2); }
.demo-card__name span { display: block; font-family: var(--font-body); font-size: 0.8125rem; font-weight: 500; color: var(--ink-500); margin-top: 2px; }
.demo-card__desc { color: var(--ink-500); font-size: 0.9375rem; margin-bottom: var(--space-3); }
.demo-card__features { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); flex-grow: 1; }
.demo-card__features li { display: flex; align-items: flex-start; gap: var(--space-2); font-size: 0.875rem; color: var(--ink-700); }
.demo-card__features svg { width: 16px; height: 16px; color: var(--brand-indigo); flex-shrink: 0; margin-top: 2px; }
[data-theme="dark"] .demo-card__features svg { color: var(--brand-aqua); }

@media (max-width: 1024px) { .demos__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .demos__grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------- */
/* Custom AI Agent case studies — a uniform card grid (same shape, same     */
/* image ratio, same rhythm for all six) rather than an editorial          */
/* alternating layout, since the source screenshots vary wildly in their   */
/* native aspect ratio (1.65:1 to nearly 3:1) and letting each card follow  */
/* its own image shape made the row heights and alignment inconsistent.    */
/* ---------------------------------------------------------------------- */
.cases__grid { grid-template-columns: repeat(2, 1fr); }
.case-card { min-width: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.case-card__media {
  position: relative;
  aspect-ratio: 2 / 1; /* one fixed ratio for every card — chosen to keep
    worst-case cropping reasonable across all six source screenshots */
  background: var(--brand-gradient-soft);
}
.case-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case-card__body { padding: var(--space-6); display: flex; flex-direction: column; flex-grow: 1; }
@media screen and (max-width: 768px) { .case-card__body{ padding:1.1rem;} }
.case-card__category { margin-bottom: var(--space-3); }

/* Title, description and result all get a matched min-height + line-clamp
   pair: min-height reserves the same space whether the text is short or
   long, and line-clamp caps anything that runs over — between the two,
   every card ends up the same height regardless of exact copy length or
   how a particular title happens to wrap. */
.case-card__title {
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.case-card__desc {
  color: var(--ink-500);
  font-size: 0.9375rem;
  margin-bottom: var(--space-4);
  min-height: calc(0.9375rem * var(--lh-body) * 3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.case-card__result {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: calc(0.6875rem + 0.9375rem * var(--lh-body) * 2 + var(--space-3) * 2 + 0.4rem);
  background: var(--brand-gradient-soft);
  border-left: 3px solid var(--brand-indigo);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}
[data-theme="dark"] .case-card__result { border-left-color: var(--brand-aqua); }
.case-card__result-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--brand-indigo);
}
[data-theme="dark"] .case-card__result-label { color: var(--brand-aqua); }
.case-card__result-text {
  font-size: 0.9375rem;
  color: var(--ink-900);
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.case-card__stack { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: auto; margin-bottom: var(--space-4); }
.case-card__stack-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink-500);
}
.case-card__cta { align-self: flex-start; }

@media (max-width: 900px) { .cases__grid { grid-template-columns: 1fr; } }
