/* Case-study page grammar — dark photo hero with phrase stat tiles, gradient
   cards with status badges, step rail, dark status strip, light CTA.
   Each page sets its own hero image with --hero-photo on .case-hero. */

/* ─── Projects-page grammar, applied to a case study ─────────────────── */
.case-page .section { padding: 2.25rem 0; }

/* ─── HERO ────────────────────────────────────────────────────────────── */
.case-hero {
  padding: 1.75rem 0 1.25rem;
  background:
    radial-gradient(circle at 15% 20%, rgba(41,171,226,0.28), transparent 55%),
    radial-gradient(circle at 85% 30%, rgba(168,85,247,0.22), transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(236,72,153,0.18), transparent 60%),
    linear-gradient(135deg, #0F172A 0%, #1A2E44 100%);
  color: var(--text-dark);
  position: relative;
  overflow: hidden;
}
.case-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-photo) no-repeat center center;
  background-size: cover;
  opacity: 0.85;
  pointer-events: none;
}
.case-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(15,23,42,0.92) 22%, rgba(15,23,42,0.55) 55%, rgba(15,23,42,0.15) 100%);
  pointer-events: none;
}
.case-hero .container { position: relative; z-index: 1; }
@media (max-width: 860px) {
  .case-hero { padding: 1.5rem 0 1.25rem; }
  .case-hero::before { background-position: 88% center; opacity: 0.75; }
  .case-hero::after {
    background: linear-gradient(to bottom, rgba(15,23,42,0.88) 0%, rgba(15,23,42,0.72) 60%, rgba(15,23,42,0.5) 100%);
  }
}
.case-hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.75rem);
  color: #fff;
  margin: 0.25rem 0 0.5rem;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.case-hero h1 .hl { color: var(--accent); }
.case-hero p.lede { color: #CBD5E1; font-size: 1.0625rem; line-height: 1.65; max-width: 680px; margin: 0; }
.case-hero .section__eyebrow a { color: var(--accent); text-decoration: none; }
.case-hero .section__eyebrow a:hover { text-decoration: underline; }

.case-intro-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.9rem;
  max-width: 760px;
}
@media (max-width: 640px) { .case-intro-row { grid-template-columns: repeat(3,1fr); gap: 0.5rem; } }
.stat {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  backdrop-filter: blur(4px);
}
.stat__num { font-size: 1.0625rem; font-weight: 800; line-height: 1.25; color: var(--accent); }
.stat__label { font-size: 0.75rem; color: #CBD5E1; margin-top: 0.35rem; letter-spacing: 0.02em; }

/* ─── CONTEXT (client + problem) ──────────────────────────────────────── */
.case-section { padding: 1.75rem 0 2.25rem !important; }
.case-section .section__eyebrow { margin-bottom: 0.25rem; }
.case-section .section__headline { margin-bottom: 0.4rem; font-size: 1.5rem; }
.case-section .section__sub { margin: 0 0 1.25rem; font-size: 0.9375rem; }

.case-context {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (max-width: 780px) { .case-context { grid-template-columns: 1fr; } }
.case-context p { color: #475569; font-size: 0.9375rem; line-height: 1.65; margin: 0.35rem 0 0; }
.case-context h3 { font-size: 1.0625rem; font-weight: 700; color: var(--text-light); margin: 0; line-height: 1.2; }
.case-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.15rem;
}

/* ─── GRID ────────────────────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 1024px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .projects-grid { grid-template-columns: 1fr; } }

/* ─── CARD ────────────────────────────────────────────────────────────── */
.project-card {
  --c1: #29ABE2;
  --c2: #A855F7;
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  overflow: hidden;
  isolation: isolate;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  z-index: 1;
}
.project-card::after {
  content: '';
  position: absolute;
  top: 0; right: -40%;
  width: 70%; height: 100%;
  background: radial-gradient(ellipse at top right, color-mix(in oklch, var(--c1) 14%, transparent), transparent 65%);
  z-index: 0;
  pointer-events: none;
}
.project-card > * { position: relative; z-index: 2; }
.project-card:hover {
  border-color: transparent;
  box-shadow: 0 10px 28px -8px color-mix(in oklch, var(--c1) 35%, transparent),
              0 0 0 2px color-mix(in oklch, var(--c2) 30%, transparent);
  transform: translateY(-3px);
}

.project-card.c-cyan    { --c1: #06B6D4; --c2: #29ABE2; }
.project-card.c-violet  { --c1: #8B5CF6; --c2: #EC4899; }
.project-card.c-emerald { --c1: #10B981; --c2: #06B6D4; }
.project-card.c-amber   { --c1: #F59E0B; --c2: #EF4444; }
.project-card.c-rose    { --c1: #F43F5E; --c2: #A855F7; }
.project-card.c-indigo  { --c1: #6366F1; --c2: #06B6D4; }
.project-card.c-teal    { --c1: #14B8A6; --c2: #6366F1; }

.project-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 0.15rem;
}
.project-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-light);
  margin: 0;
  line-height: 1.2;
}
.project-card__url {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  margin-top: 0.15rem;
  display: inline-block;
}
.project-card__url:hover { text-decoration: underline; text-decoration-color: var(--c1); }
.project-card__url--muted {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.75rem;
  color: #94A3B8;
  margin-top: 0.15rem;
  display: inline-block;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge--live    { background: linear-gradient(135deg, #DCFCE7, #86EFAC); color: #14532D; }
.badge--build   { background: linear-gradient(135deg, #DBEAFE, #93C5FD); color: #1E3A8A; }
.badge--design  { background: linear-gradient(135deg, #FEF3C7, #FCD34D); color: #78350F; }
.badge--ongoing { background: linear-gradient(135deg, #F3E8FF, #C4B5FD); color: #4C1D95; }

.project-card__desc {
  color: #475569;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
}
.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.1rem;
}
.tag {
  font-size: 0.6875rem;
  color: #475569;
  background: #F1F5F9;
  padding: 0.18rem 0.45rem;
  border-radius: 5px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  border: 1px solid #E2E8F0;
}
.stack-tags { margin-top: 1.1rem; }

/* ─── Shipped-screens strip ───────────────────────────────────────────── */
.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 780px) { .shots { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .shots { grid-template-columns: 1fr; } }
.shot {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.9rem;
  margin: 0;
  overflow: hidden;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: #0F172A;
}
.shot figcaption {
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.5;
  margin-top: 0.7rem;
}
.shot figcaption strong { color: var(--text-light); font-weight: 700; }
.shot--wide { grid-column: 1 / -1; }
@media (max-width: 520px) { .shot--wide { grid-column: auto; } }

/* ─── Step rail ───────────────────────────────────────────────────────── */
.flow-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  counter-reset: step;
}
@media (max-width: 780px) { .flow-rail { grid-template-columns: 1fr; } }
.flow-step {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.15rem 1.15rem 1.15rem 3.1rem;
}
.flow-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1.15rem; top: 1.1rem;
  width: 1.5rem; height: 1.5rem;
  border-radius: 999px;
  display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #29ABE2, #A855F7);
}
.flow-step h3 { font-size: 1rem; font-weight: 700; color: var(--text-light); margin: 0 0 0.3rem; line-height: 1.2; }
.flow-step p  { color: #475569; font-size: 0.875rem; line-height: 1.6; margin: 0; }

/* ─── STATUS / HOW strip ──────────────────────────────────────────────── */
.how-strip {
  padding: 1.75rem 0 !important;
  background:
    radial-gradient(circle at 20% 50%, rgba(41,171,226,0.18), transparent 60%),
    radial-gradient(circle at 80% 50%, rgba(168,85,247,0.15), transparent 60%),
    var(--dark-base);
}
.how-strip h2 { font-size: 1.35rem; margin: 0.3rem 0 0.5rem; color: var(--text-dark); }
.how-strip p  { color: #CBD5E1; font-size: 0.95rem; margin: 0 0 0.75rem; max-width: 760px; }
.how-strip p:last-child { margin-bottom: 0; }

/* ─── Final CTA ───────────────────────────────────────────────────────── */
.cta-strip { padding: 2rem 0 2.5rem !important; }
.cta-strip h2 { font-size: 1.5rem; margin: 0.3rem 0 0.5rem; }
.cta-strip p  { font-size: 1rem; margin: 0 0 1rem; }

/* ─── Pull quote ──────────────────────────────────────────────────────── */
.case-quote {
  margin: 0;
  padding: 1.1rem 1.4rem;
  border-left: 4px solid var(--accent);
  background: #fff;
  border-radius: 0 12px 12px 0;
  font-size: 1.125rem;
  line-height: 1.6;
  font-style: italic;
  color: var(--text-light);
}
.case-quote cite {
  display: block;
  margin-top: 0.7rem;
  font-style: normal;
  font-size: 0.875rem;
  color: #64748B;
}
