/* =========================================================
   LS – Cases widget (V1.1 – Editorial polish)
   Proof-first, calm authority, tactile depth
========================================================= */

.ls-case-card {
  align-items: flex-start;
  text-align: left;
  position: relative;
  overflow: hidden;

  background: var(--ls-surface, #fff);
  border-radius: var(--ls-radius-md);
  box-shadow:
    0 1px 0 rgba(255,255,255,.7) inset,
    0 14px 36px rgba(10,35,66,.08);

  transition:
    transform .25s ease,
    box-shadow .25s ease;
}

/* ---------------------------------------------------------
   Background image – refined texture layer
--------------------------------------------------------- */

.ls-case-card.has-bg::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image: var(--card-bg);
  background-size: cover;
  background-position: center;

  opacity: 0.32;
  filter: saturate(0.8) contrast(0.9) brightness(1.05);

  z-index: 0;
}

/* ---------------------------------------------------------
   Overlay – editorial readability
--------------------------------------------------------- */

.ls-case-card.has-bg::after {
  content: "";
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to bottom,
      rgba(255,255,255,0.55) 0%,
      rgba(255,255,255,0.82) 42%,
      rgba(255,255,255,0.97) 100%
    );

  z-index: 0;
}

/* ---------------------------------------------------------
   Content layer
--------------------------------------------------------- */

.ls-case-card > * {
  position: relative;
  z-index: 1;
}

/* ---------------------------------------------------------
   Result highlight – anchor of attention
--------------------------------------------------------- */

.ls-case-result {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-accent);
}

/* Subtle underline cue */
.ls-case-result::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-top: 6px;
  border-radius: 2px;
  background: var(--color-accent);
  opacity: .35;
}

/* ---------------------------------------------------------
   Title & body – editorial rhythm
--------------------------------------------------------- */

.ls-case-card .ls-card-title {
  line-height: 1.35;
}

.ls-case-card .ls-card-text {
  max-width: 48ch;
  line-height: 1.65;
}

/* ---------------------------------------------------------
   Meta info – documentation tone
--------------------------------------------------------- */

.ls-case-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
  opacity: .9;
}

/* ---------------------------------------------------------
   Hover – quiet confidence
--------------------------------------------------------- */

@media (hover:hover) {

  .ls-case-card:hover {
    transform: translateY(-4px);
    box-shadow:
      0 1px 0 rgba(255,255,255,.8) inset,
      0 28px 64px rgba(10,35,66,.14);
  }

}

/* ---------------------------------------------------------
   Full-card link
--------------------------------------------------------- */

.ls-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* ---------------------------------------------------------
   Reduced motion
--------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

  .ls-case-card {
    transition: none;
  }

}
