/* Shared styles for case detail pages (loaded after ../styles.css) */

/* ---------- Hero ---------- */
.case-hero {
  padding: 150px 0 80px; position: relative; overflow: hidden;
  background:
    radial-gradient(50% 60% at 80% 20%, rgba(139, 92, 246, .2), transparent 70%),
    radial-gradient(40% 50% at 10% 90%, rgba(34, 211, 238, .12), transparent 70%),
    var(--bg);
}
.crumb { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.crumb a:hover { color: var(--text); }
.crumb span { margin: 0 8px; opacity: .5; }
.case-hero h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.2; font-weight: 800; letter-spacing: -.5px; }
.case-hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.case-hero .summary { max-width: 720px; color: var(--muted); font-size: clamp(16px, 1.6vw, 18px); margin: 20px 0 28px; }
.case-meta { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 36px; }
.case-meta div { font-size: 13px; color: var(--muted); }
.case-meta strong { display: block; font-size: 16px; color: var(--text); font-weight: 600; }

/* ---------- Background ---------- */
.bg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.bg-card { padding: 30px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); }
.bg-card h3 { font-size: 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.bg-card h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.bg-card ul { display: grid; gap: 10px; color: var(--muted); font-size: 15px; }
.bg-card li { padding-left: 18px; position: relative; }
.bg-card li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }

/* ---------- Flow ---------- */
.flow { display: grid; grid-template-columns: repeat(var(--n, 6), 1fr); gap: 16px; counter-reset: step; }
.flow li { position: relative; padding-top: 56px; }
.flow li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #fff; background: var(--grad);
  box-shadow: 0 8px 24px -8px rgba(79, 140, 255, .7);
}
.flow li:not(:last-child)::after {
  content: ""; position: absolute; top: 20px; left: 52px; right: -4px; height: 1px;
  background: linear-gradient(90deg, rgba(79, 140, 255, .6), rgba(79, 140, 255, .05));
}
.flow h4 { font-size: 16px; margin-bottom: 6px; }
.flow p { font-size: 13px; color: var(--muted); line-height: 1.65; }

/* ---------- Demo shell ---------- */
.demo { border-radius: 20px; border: 1px solid var(--border); background: #070a16; overflow: hidden; box-shadow: 0 40px 100px -40px rgba(79, 140, 255, .35); }
.demo-bar { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, .03); }
.demo-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a4258; }
.demo-bar i:nth-child(1) { background: #ff5f57; } .demo-bar i:nth-child(2) { background: #febc2e; } .demo-bar i:nth-child(3) { background: #28c840; }
.demo-bar b { margin-left: 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.demo-badge { margin-left: auto; font-size: 12px; color: #fbbf24; border: 1px solid rgba(251, 191, 36, .4); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.demo-body { padding: 24px; }
.demo-note { margin-top: 14px; font-size: 13px; color: var(--muted); }

.panel { border: 1px solid var(--border); border-radius: 14px; background: rgba(255, 255, 255, .025); padding: 18px; min-width: 0; }
.panel-title { font-size: 13px; letter-spacing: 1px; color: var(--muted); margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.mini-btn {
  font: inherit; font-size: 13px; color: var(--text); cursor: pointer; white-space: nowrap;
  padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(79, 140, 255, .45); background: rgba(79, 140, 255, .1);
  transition: background .2s;
}
.mini-btn:hover { background: rgba(79, 140, 255, .25); }
.mini-btn.primary { background: var(--grad); border-color: transparent; color: #fff; }
.mini-btn:disabled { opacity: .5; cursor: progress; }

.field { width: 100%; font: inherit; font-size: 14px; color: var(--text); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: rgba(5, 7, 15, .7); outline: none; }
.field:focus { border-color: var(--accent); }
textarea.field { resize: vertical; line-height: 1.7; }
select.field option { background: var(--bg-alt); }

.pill { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.pill.hi { color: #34d399; border-color: rgba(52, 211, 153, .45); background: rgba(52, 211, 153, .08); }
.pill.mid { color: #fbbf24; border-color: rgba(251, 191, 36, .45); background: rgba(251, 191, 36, .08); }
.pill.lo { color: var(--muted); }
.pill.blue { color: #b8cbff; border-color: rgba(79, 140, 255, .4); background: rgba(79, 140, 255, .08); }
.pill.red { color: #f472b6; border-color: rgba(244, 114, 182, .4); background: rgba(244, 114, 182, .08); }

.bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 4px; transition: width .8s ease; }

.empty { color: var(--muted); font-size: 14px; text-align: center; padding: 40px 10px; }
.fade-in { animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Deliverables ---------- */
.deliver { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.deliver div { padding: 24px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); }
.deliver strong { display: block; font-size: 17px; margin-bottom: 6px; }
.deliver span { font-size: 14px; color: var(--muted); }

/* ---------- More cases ---------- */
.more { display: grid; grid-template-columns: repeat(2, 1fr) 1.2fr; gap: 18px; }
.more a {
  padding: 26px; border-radius: 16px; border: 1px solid var(--border); background: var(--card);
  transition: border-color .3s, transform .3s;
}
.more a:hover { border-color: rgba(79, 140, 255, .5); transform: translateY(-4px); }
.more small { font-size: 12px; color: var(--accent-3); letter-spacing: 1px; }
.more h4 { font-size: 17px; margin: 6px 0 14px; }
.more em { font-style: normal; font-size: 14px; color: var(--accent); }
.more .cta { background: radial-gradient(80% 120% at 50% 0%, rgba(139, 92, 246, .28), transparent 70%), var(--card); }

@media (max-width: 960px) {
  .flow { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
  .flow li:nth-child(3n)::after { display: none; }
  .split, .bg-grid { grid-template-columns: 1fr; }
  .more { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .case-hero { padding: 120px 0 56px; }
  .flow { grid-template-columns: 1fr; row-gap: 20px; }
  .flow li { padding: 0 0 0 56px; min-height: 40px; }
  .flow li::after { display: none; }
  .demo-body { padding: 14px; }
  .demo-bar b { display: none; }
  .bg-card { padding: 22px; }
}
