/* ═══════════════════════════════════════════════════════════════════════════
   CASE STUDY PAGE — PyStatR+
   Posit-style restraint: light surface, big typography, generous whitespace
   ═══════════════════════════════════════════════════════════════════════════ */

/* ──── Hero ──── */

.case-study-hero {
  position: relative;
  padding: calc(var(--navbar-height, 70px) + 3rem) 2rem 4rem;
  background: linear-gradient(135deg, #003366 0%, #1E3A8A 50%, #0B1120 100%);
  overflow: hidden;
}

.case-study-hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.06) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
  pointer-events: none;
}

.case-study-hero-content {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.case-study-back {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #38BDF8;
  text-decoration: none;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
}

.case-study-back:hover {
  color: #FFD700;
}

.case-study-eyebrow {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #FFD700;
  margin-bottom: 1rem;
  padding: 0.4rem 1rem;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 9999px;
}

.case-study-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 1rem 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.case-study-tagline {
  font-family: 'Roboto', sans-serif;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.6;
  color: #E5E7EB;
  margin: 0 0 2.5rem 0;
  max-width: 760px;
}

/* Facts strip */
.case-study-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid rgba(56, 189, 248, 0.2);
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  margin-bottom: 2rem;
}

.case-fact {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.case-fact-label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #38BDF8;
}

.case-fact-value {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.005em;
}

.case-study-live-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, #FACC15, #FFD700);
  color: #0B1120 !important;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 9999px;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 18px rgba(255, 215, 0, 0.3);
}

.case-study-live-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 215, 0, 0.45);
}

/* ──── Screenshot section ──── */

.case-study-screenshot {
  padding: 5rem 2rem 2rem;
  background: #ffffff;
}

.case-study-screenshot .container {
  max-width: 1100px;
  margin: 0 auto;
}

.case-study-figure {
  margin: 0;
  padding: 0;
}

.case-study-image {
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow:
    0 25px 60px rgba(0, 51, 102, 0.18),
    0 8px 20px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(56, 189, 248, 0.15);
}

.case-study-caption {
  margin-top: 1.25rem;
  text-align: center;
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem;
  color: #6B7280;
  font-style: italic;
  line-height: 1.6;
}

/* Body content inherits site-wide typography from styles.css.
   Per-section custom styling above stays scoped via .case-study-* classes. */

/* ──── Mobile ──── */

@media (max-width: 768px) {
  .case-study-hero {
    padding: calc(var(--navbar-height, 70px) + 2rem) 1.5rem 3rem;
  }
  .case-study-facts {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.25rem 0;
    margin-bottom: 1.5rem;
  }
  .case-study-screenshot {
    padding: 3rem 1.5rem 1.5rem;
  }
}
