/* ============================================================
   COMPONENT: Case Studies (Home teaser)
   FILE: assets/css/case-studies.css
   Depends on: case-studies.html.
   Loaded after testimonials.css (Phase 1.0 §6, in build order).

   Global Card System: `.surface--solid` (surfaces.css) supplies
   the card's white background, hairline border, radius and
   resting shadow — same convention portfolio.css/testimonials.css
   already use. Only card-specific layout (icon badge, internal
   spacing) is added here, scoped under .case-studies__card —
   nothing here redefines the surface system itself.

   Section background is light-gray, continuing the white/
   light-gray alternation already established by ... Portfolio
   (light-gray) -> Testimonials (white) -> Case Studies
   (light-gray) here.

   Card = informational (a plain <li>, not a link): same
   convention portfolio.css uses, since these are category
   snapshots rather than individual destination pages. The path
   to the full Case Studies page is the single
   .case-studies__cta below the grid instead, styled with
   nothing but the existing global .btn / .btn--primary /
   .btn--lg classes from buttons.css — no new button variant is
   introduced here.

   No new JavaScript: this section has no motion hook, matching
   the "static HTML/CSS is enough, do not add JavaScript" rule
   Portfolio/Testimonials already follow for this kind of grid.
   The hover states below are pure CSS `:hover`.

   RTL readiness (Stage 5.8 scope only): logical properties
   (text-align: start, margin-inline / padding-inline) are used
   instead of physical left/right, matching testimonials.css's
   convention, so this section reads correctly if an ancestor
   later sets dir="rtl" for Urdu content — no separate RTL
   stylesheet or breakpoint system is introduced.
   ============================================================ */

.case-studies {
  background-color: var(--color-light-gray);
  padding-block: var(--space-10);
}

.case-studies__inner {
  text-align: center;
}

.case-studies__heading {
  margin: 0 0 var(--space-2);
  color: var(--color-navy);
  font-size: var(--text-h3);
}

.case-studies__subheading {
  max-width: 640px;
  margin-inline: auto;
  margin-block: 0 var(--space-6);
  color: var(--color-dark-gray);
  font-size: var(--text-body);
}

/* ------------------------------------------------------------
   GRID
   Single column on mobile, 2 columns on tablet, 3 across on
   desktop for the three case-study cards — mirrors the
   column-count progression already used by Testimonials
   (3-up desktop) rather than Portfolio's 4-up, since this teaser
   holds three cards, not four.
------------------------------------------------------------ */
.case-studies__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);

  list-style: none;
}

/* ------------------------------------------------------------
   CARD
------------------------------------------------------------ */
.case-studies__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-4);
  text-align: start;

  transition:
    border-color var(--duration-fast) var(--ease-premium),
    box-shadow var(--duration-fast) var(--ease-premium),
    transform var(--duration-fast) var(--ease-premium);
}

.case-studies__card:hover {
  border-color: rgba(var(--color-navy-rgb), 0.3);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.case-studies__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background-color: rgba(var(--color-gold-rgb), 0.12);
  color: var(--color-gold);
}

.case-studies__icon svg {
  width: 24px;
  height: 24px;
}

.case-studies__title {
  margin: 0;
  color: var(--color-navy);
  font-size: 1.125rem;
  line-height: var(--line-height-heading);
}

.case-studies__text {
  margin: 0;
  color: var(--color-dark-gray);
  font-size: var(--text-small);
  line-height: var(--line-height-body);
}

/* ------------------------------------------------------------
   CTA
   Reuses the existing global .btn system exactly as Portfolio's/
   Testimonials' CTA does — centered below the grid as the
   section's single, clear path to the full Case Studies page.
------------------------------------------------------------ */
.case-studies__cta-wrap {
  margin-block-start: var(--space-6);
}

/* ------------------------------------------------------------
   RESPONSIVE
   Breakpoint values copied from tokens.css's documented
   reference values, same convention portfolio.css/
   testimonials.css use.
------------------------------------------------------------ */

/* Tablet: 2 columns */
@media (min-width: 768px) {
  .case-studies__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
}

/* Desktop and up: 3 across */
@media (min-width: 1024px) {
  .case-studies {
    padding-block: var(--space-12);
  }

  .case-studies__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }

  .case-studies__card {
    padding: var(--space-5);
  }

  .case-studies__cta-wrap {
    margin-block-start: var(--space-8);
  }
}

/* Small mobile: tighten spacing, keep cards compact, no overflow */
@media (max-width: 479px) {
  .case-studies {
    padding-block: var(--space-8);
  }

  .case-studies__grid {
    gap: var(--space-3);
  }

  .case-studies__card {
    padding: var(--space-3);
  }
}

/* ------------------------------------------------------------
   REDUCED MOTION
   Same convention as portfolio.css/testimonials.css: the hover
   lift is removed for users who have requested less motion,
   while state changes that aren't motion (border/shadow) remain.
------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .case-studies__card:hover {
    transform: none;
  }
}
