/* =========================================================
   Butler Bots — case study pages
   Loaded after styles.css; only adds what the home page lacks.
   ========================================================= */

.case-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--gutter) 64px;
}

.crumbs {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin-bottom: clamp(40px, 6vw, 80px);
}
.crumbs a:hover { color: var(--red); }
.crumbs .sep { color: var(--line-soft); }

.case-title {
  font-size: clamp(40px, 7vw, 112px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.045em;
  max-width: 14ch;
  margin-bottom: 28px;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.case-meta .tag { margin-bottom: 0; }
.case-meta .tag.soft { border-color: var(--line-soft); color: var(--muted); }

.case-lead {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.4;
  max-width: 60ch;
  letter-spacing: -0.01em;
}

/* Demo frame */
.demo {
  border: 1px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.demo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ink);
  background: var(--bg);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.demo-bar .left { display: inline-flex; align-items: center; gap: 10px; }
.demo-bar .dot { background: var(--red); }
.demo-bar a:hover { color: var(--red); }
.demo iframe {
  display: block;
  width: 100%;
  height: clamp(560px, 72vh, 860px);
  border: 0;
  background: #fff;
}
.demo.phone iframe { height: clamp(640px, 80vh, 900px); }

.demo-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* Two-column facts block */
.facts {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 2fr;
  gap: 48px;
}
.facts h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 18px;
}
.facts .highlights li { font-size: 16px; }

.stack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0 32px;
}
.stack li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
}
.stack li span:last-child { color: var(--muted); text-align: right; }

/* Walkthrough steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.step {
  padding-top: 16px;
  border-top: 1px solid var(--ink);
}
.step-key {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 12px;
}
.step h4 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.step p { font-size: 15px; color: var(--muted); max-width: 34ch; }

/* Next project */
.next-project {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
}
.next-project:hover .project-name { color: var(--red); }

@media (max-width: 900px) {
  .facts { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .next-project { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .demo iframe { height: 620px; }
}

/* Back to the index, under the next-project pagination */
.back-to-work {
  display: inline-block;
  margin-top: 22px;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--muted);
  transition: color 0.18s ease;
}
.back-to-work:hover { color: var(--red); }
.back-to-work .arrow.back { margin: 0 0.35em 0 0; }

/* On phones the embedded demo is cramped and competes with page scroll.
   Point people at the full-screen version instead. */
.demo-mobile-hint { display: none; }

@media (max-width: 560px) {
  .demo-mobile-hint {
    display: block;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
  }
  .demo-mobile-hint a {
    color: var(--red);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
  }
}

/* .step headings are h3 for document outline; keep the original scale. */
.step .step-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
