/* ══════════════════════════════════════════
   CASE STUDIES — article pages + listing
   ══════════════════════════════════════════ */

.cs-article {
  max-width: 820px;
  margin: 0 auto;
  padding: 120px 24px 80px;
  font-family: 'Alexandria', system-ui, sans-serif;
}

.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(244, 247, 255, 0.6);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.25s ease;
}

.cs-back:hover {
  color: #00D4FF;
}

.cs-hero {
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cs-hero .case-study-industry {
  display: inline-block;
  padding: 4px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 100px;
  margin-bottom: 20px;
}

.cs-hero[data-accent="cyan"] .case-study-industry {
  color: #00D4FF;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.cs-hero[data-accent="gold"] .case-study-industry {
  color: #F5A623;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.3);
}

.cs-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.25;
  color: #F4F7FF;
  margin: 0 0 18px;
}

.cs-lead {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.7;
  color: rgba(244, 247, 255, 0.78);
  margin: 0;
}

.cs-section {
  margin-bottom: 48px;
}

.cs-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #F4F7FF;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.cs-section p {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(244, 247, 255, 0.8);
  margin: 0 0 16px;
}

.cs-section p:last-child {
  margin-bottom: 0;
}

.cs-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cs-section ul li {
  position: relative;
  padding-inline-start: 22px;
  margin-bottom: 14px;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(244, 247, 255, 0.82);
}

.cs-section ul li::before {
  content: '';
  position: absolute;
  inset-inline-start: 4px;
  top: 0.7em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F5A623;
  box-shadow: 0 0 10px rgba(245, 166, 35, 0.5);
}

[data-accent="cyan"] ~ .cs-section ul li::before,
.cs-article[data-accent="cyan"] .cs-section ul li::before {
  background: #00D4FF;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.cs-section ul li strong {
  color: #F4F7FF;
  font-weight: 600;
}

/* Day-by-day timeline list */
.cs-week {
  display: grid;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.cs-week li {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  font-size: 0.96rem;
  line-height: 1.6;
  color: rgba(244, 247, 255, 0.8);
}

.cs-week li::before {
  display: none !important;
}

.cs-week li strong {
  display: block;
  margin-bottom: 4px;
  color: #F5A623;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.cs-final-cta {
  margin-top: 64px;
  padding: 40px 32px;
  text-align: center;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.06) 0%, rgba(245, 166, 35, 0.06) 100%);
  border: 1px solid rgba(245, 166, 35, 0.18);
  border-radius: 18px;
}

.cs-final-cta h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: #F4F7FF;
  margin: 0 0 12px;
}

.cs-final-cta p {
  font-size: 1rem;
  color: rgba(244, 247, 255, 0.7);
  margin: 0 0 24px;
}

.cs-final-cta .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  border-radius: 100px;
  background: linear-gradient(135deg, #F5A623, #F8C76A);
  color: #070B24;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cs-final-cta .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(245, 166, 35, 0.35);
}

/* Listing page grid */
.cs-listing {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.cs-listing-header {
  text-align: center;
  margin-bottom: 56px;
}

.cs-listing-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: #F4F7FF;
  margin: 0 0 14px;
}

.cs-listing-header p {
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.7;
  color: rgba(244, 247, 255, 0.7);
  max-width: 640px;
  margin: 0 auto;
}

.cs-listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.cs-listing-card {
  display: block;
  padding: 28px 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  text-decoration: none;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.cs-listing-card[data-accent="cyan"] {
  border-color: rgba(0, 212, 255, 0.18);
}

.cs-listing-card[data-accent="gold"] {
  border-color: rgba(245, 166, 35, 0.2);
}

.cs-listing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.cs-listing-card[data-accent="cyan"]:hover {
  border-color: rgba(0, 212, 255, 0.45);
}

.cs-listing-card[data-accent="gold"]:hover {
  border-color: rgba(245, 166, 35, 0.5);
}

.cs-listing-card .case-study-industry {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 100px;
  margin-bottom: 14px;
}

.cs-listing-card[data-accent="cyan"] .case-study-industry {
  color: #00D4FF;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.cs-listing-card[data-accent="gold"] .case-study-industry {
  color: #F5A623;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.3);
}

.cs-listing-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #F4F7FF;
  margin: 0 0 10px;
  line-height: 1.4;
}

.cs-listing-card p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(244, 247, 255, 0.7);
  margin: 0 0 16px;
}

.cs-listing-card .cs-listing-readmore {
  font-size: 0.85rem;
  font-weight: 600;
}

.cs-listing-card[data-accent="cyan"] .cs-listing-readmore {
  color: #00D4FF;
}

.cs-listing-card[data-accent="gold"] .cs-listing-readmore {
  color: #F5A623;
}

@media (max-width: 600px) {
  .cs-article {
    padding: 96px 18px 60px;
  }
  .cs-section {
    margin-bottom: 36px;
  }
  .cs-final-cta {
    padding: 32px 22px;
    margin-top: 48px;
  }
}

/* ══════════════════════════════════════════
   Realistic prompt block (verbatim brief)
   ══════════════════════════════════════════ */
.cs-prompt-block {
  background: rgba(0, 207, 255, 0.05);
  border: 1px solid rgba(0, 207, 255, 0.18);
  border-radius: 12px;
  padding: 22px 26px;
  margin: 18px 0 8px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.85;
  white-space: pre-wrap;
  color: rgba(244, 247, 255, 0.88);
  overflow-x: auto;
}

html[lang="ar"] .cs-prompt-en,
html[lang="en"] .cs-prompt-ar {
  display: none !important;
}

@media (max-width: 720px) {
  .cs-prompt-block {
    padding: 18px 18px;
    font-size: 13px;
    line-height: 1.75;
  }
}

/* ══════════════════════════════════════════
   Animated Demo Panel — chat → result reveal
   Framed as a chrome'd "media element" so it
   reads as a screen, not body text.
   ══════════════════════════════════════════ */
.cs-demo-frame {
  margin: 36px 0 44px;
  border-radius: 16px;
  background: linear-gradient(180deg, #0d1330 0%, #070b24 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 2px 8px rgba(0, 207, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  position: relative;
}

.cs-demo-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(0, 207, 255, 0.07), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.cs-demo-frame-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 1;
}

.cs-demo-frame-dots {
  display: inline-flex;
  gap: 6px;
}

.cs-demo-frame-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.cs-demo-frame-dots span:nth-child(1) { background: #ff5f56; }
.cs-demo-frame-dots span:nth-child(2) { background: #ffbd2e; }
.cs-demo-frame-dots span:nth-child(3) { background: #27c93f; }

.cs-demo-frame-title {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(244, 247, 255, 0.5);
  margin: 0 auto;
}

.cs-demo {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
  padding: 22px;
  position: relative;
  z-index: 1;
}

.cs-demo-chat,
.cs-demo-output {
  position: relative;
  z-index: 1;
}

.cs-demo-chat {
  background: rgba(7, 11, 36, 0.55);
  border: 1px solid rgba(0, 207, 255, 0.14);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.cs-demo-chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 247, 255, 0.5);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cs-demo-chat-head::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00D4FF;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
  animation: cs-pulse 2s ease-in-out infinite;
}

.cs-demo-typed {
  flex: 1;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.8px;
  line-height: 1.85;
  color: rgba(244, 247, 255, 0.9);
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
  min-height: 100px;
}

.cs-demo-typed::after {
  content: "▋";
  display: inline-block;
  color: #00D4FF;
  animation: cs-caret 0.9s step-end infinite;
  margin-inline-start: 2px;
  font-size: 0.95em;
  vertical-align: baseline;
}

.cs-demo-typed.is-done::after {
  display: none !important;
}

.cs-demo-thinking {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(255, 200, 0, 0.06);
  border-inline-start: 2px solid rgba(255, 200, 0, 0.5);
  border-radius: 6px;
  font-size: 12px;
  color: rgba(244, 247, 255, 0.7);
  font-family: 'Alexandria', system-ui, sans-serif;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.cs-demo-thinking.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cs-demo-thinking::before {
  content: "•";
  margin-inline-end: 6px;
  animation: cs-blink 1.2s ease-in-out infinite;
  color: #FFC800;
}

.cs-demo-output {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 320px;
}

.cs-demo-output-head {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 247, 255, 0.5);
  padding: 0 4px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 4px;
}

.cs-demo-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(7, 11, 36, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: 'Alexandria', system-ui, sans-serif;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.cs-demo-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cs-demo-card-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 207, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #00D4FF;
}

.cs-demo-card[data-tone="gold"] .cs-demo-card-icon {
  background: rgba(255, 200, 0, 0.12);
  color: #FFC800;
}

.cs-demo-card[data-tone="green"] .cs-demo-card-icon {
  background: rgba(80, 220, 130, 0.12);
  color: #50DC82;
}

.cs-demo-card[data-tone="violet"] .cs-demo-card-icon {
  background: rgba(180, 130, 255, 0.12);
  color: #B482FF;
}

.cs-demo-card-body {
  flex: 1;
  min-width: 0;
}

.cs-demo-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(244, 247, 255, 0.95);
  margin-bottom: 2px;
}

.cs-demo-card-meta {
  font-size: 11.5px;
  color: rgba(244, 247, 255, 0.55);
  line-height: 1.5;
}

.cs-demo-card-meta code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
  color: rgba(244, 247, 255, 0.85);
}

@keyframes cs-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

@keyframes cs-caret {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

@keyframes cs-blink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

html[lang="ar"] .cs-demo-en,
html[lang="en"] .cs-demo-ar {
  display: none !important;
}

@media (max-width: 760px) {
  .cs-demo {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 14px;
  }
  .cs-demo-chat,
  .cs-demo-output {
    min-height: auto;
  }
  .cs-demo-typed {
    font-size: 12px;
    line-height: 1.8;
  }
}

/* Hide PacaChat live demo across all case studies until per-article copy
   is reviewed for narrative alignment. Also hides the immediately-preceding
   lead-in paragraph so its trailing colon doesn't dangle. */
.cs-demo-frame { display: none; }
.cs-section p:has(+ .cs-demo-frame) { display: none; }
