/* AI_Solutions/IrieVybz_AI/site/assets/case-study/style.css */
:root {
  --cs-primary: #009B3A;
  --cs-accent: #FFD700;
  --cs-text: #1a1a1a;
  --cs-muted: #555;
  --cs-card-bg: #fff;
  --cs-card-shadow: 0 12px 36px rgba(0,0,0,0.10);
  --cs-radius: 16px;
  --cs-flip-ms: 600ms;
}

.cs-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--cs-text);
  background: #f8f9f8;
  min-height: 100vh;
  padding: 4rem 1.5rem;
}

.cs-hero {
  max-width: 820px;
  margin: 0 auto 3rem;
  text-align: center;
}
.cs-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 1rem; }
.cs-hero p  { font-size: 1.15rem; color: var(--cs-muted); margin: 0; }

/* ── Timeline rail ── */
.cs-timeline {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

/* vertical centre line */
.cs-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--cs-primary);
  transform: translateX(-50%);
  z-index: 0;
}

/* section header bands */
.cs-section-header {
  position: relative;
  z-index: 2;
  background: var(--cs-primary);
  color: #fff;
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  margin: 2rem 0;
  letter-spacing: 0.04em;
  border-radius: 4px;
}

/* cards */
.cs-card {
  position: relative;
  width: calc(50% - 60px);
  margin-bottom: 2.5rem;
  z-index: 1;
  perspective: 1200px;
  min-height: 380px;
}

/* left-side cards */
.cs-card--left {
  margin-left: 0;
  margin-right: auto;
}

/* right-side cards */
.cs-card--right {
  margin-left: auto;
  margin-right: 0;
}

/* dot on the timeline rail */
.cs-card::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cs-primary);
  transform: translateY(-50%);
  z-index: 3;
}
.cs-card--left::after  { right: -67px; }
.cs-card--right::after { left: -67px; }

/* horizontal connector from card edge to dot */
.cs-card::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 30px;
  height: 1.5px;
  background: var(--cs-primary);
  transform: translateY(-50%);
  z-index: 2;
}
.cs-card--left::before  { right: -37px; }
.cs-card--right::before { left: -37px; }

/* step number badge */
.cs-step-num {
  position: absolute;
  top: -18px;
  left: -18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cs-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.cs-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 380px;
  transition: transform var(--cs-flip-ms) cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}
.cs-card.is-flipped .cs-card-inner { transform: rotateY(180deg); }

.cs-card-face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: var(--cs-card-bg);
  border-radius: var(--cs-radius);
  box-shadow: var(--cs-card-shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cs-card-back { transform: rotateY(180deg); overflow-y: auto; }

.cs-badge-perspective {
  position: absolute; top: 12px; left: 12px;
  font-size: 1.25rem; line-height: 1;
}
.cs-badge-tier {
  position: absolute; top: 12px; right: 12px;
  font-size: 0.7rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  background: var(--cs-primary); color: #fff;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.cs-badge-tier.t-studio    { background: #1a1a1a; }
.cs-badge-tier.t-autopilot { background: var(--cs-primary); }
.cs-badge-tier.t-messenger { background: #555; }
.cs-badge-tier.t-starter   { background: #999; }

.cs-time { font-size: 0.85rem; color: var(--cs-muted); margin-top: 2.5rem; }
.cs-title { font-size: 1.3rem; margin: 0.25rem 0 0.75rem; line-height: 1.3; }
.cs-scene { font-size: 0.95rem; color: var(--cs-text); line-height: 1.5; }
.cs-artwork {
  margin-top: auto;
  width: 100%; height: 140px;
  object-fit: cover;
  border-radius: 8px;
  background: #eee;
}

.cs-back-section { margin-bottom: 1rem; }
.cs-back-section h4 {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--cs-muted); margin: 0 0 0.5rem; font-weight: 700;
}
.cs-artifact-wrap { background: #f0f0f0; border-radius: 8px; overflow: hidden; }
.cs-artifact-wrap img, .cs-artifact-wrap video, .cs-artifact-wrap iframe {
  width: 100%; display: block; max-height: 200px; object-fit: contain; background: #fff;
}
.cs-artifact-label { font-size: 0.7rem; color: var(--cs-muted); padding: 6px 10px; }
.cs-bullets { margin: 0; padding-left: 1.25rem; font-size: 0.9rem; line-height: 1.5; }
.cs-bullets li { margin-bottom: 0.4rem; }
.cs-tier-text { font-size: 0.85rem; font-weight: 600; color: var(--cs-primary); }
.cs-replication { font-size: 0.8rem; color: var(--cs-muted); }
.cs-replication strong { color: var(--cs-text); }

/* --- Expand button on card back --- */
.cs-expand-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 12px;
  border: none;
  border-radius: 999px;
  background: var(--cs-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.cs-expand-btn:hover {
  background: #007d2f;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}
.cs-expand-btn:focus-visible { outline: 2px solid var(--cs-primary); outline-offset: 2px; }
.cs-expand-ico { width: 14px; height: 14px; flex-shrink: 0; }
.cs-expand-label { line-height: 1; }

/* --- Modal overlay --- */
.cs-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 1.5rem;
}
.cs-modal-overlay.is-open { opacity: 1; }

.cs-modal-card {
  position: relative;
  background: var(--cs-card-bg);
  border-radius: var(--cs-radius);
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  width: min(900px, 90vw);
  max-height: 90vh;
  padding: 2rem 1.75rem 1.5rem;
  overflow-y: auto;
}

.cs-modal-body {
  font-size: 1rem;          /* slightly larger than card */
}
.cs-modal-body .cs-back-section h4 { font-size: 0.8rem; }
.cs-modal-body .cs-bullets { font-size: 1rem; }
.cs-modal-body .cs-tier-text { font-size: 1rem; }
.cs-modal-body .cs-replication { font-size: 0.95rem; }
.cs-modal-body .cs-artifact-wrap img,
.cs-modal-body .cs-artifact-wrap video,
.cs-modal-body .cs-artifact-wrap iframe {
  max-height: 60vh;
}

.cs-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: #1a1a1a;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.cs-modal-close:hover { background: rgba(0, 0, 0, 0.16); }
.cs-modal-close:focus-visible { outline: 2px solid var(--cs-primary); outline-offset: 2px; }

/* Mobile: full-screen modal */
@media (max-width: 720px) {
  .cs-modal-overlay { padding: 0; }
  .cs-modal-card {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    padding: 3rem 1.25rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-card-inner { transition: opacity 200ms ease; }
  .cs-card.is-flipped .cs-card-inner { transform: none; }
  .cs-card.is-flipped .cs-card-front { opacity: 0; pointer-events: none; }
}

@media (max-width: 720px) {
  /* line moves to left edge */
  .cs-timeline::before {
    left: 16px;
  }
  /* all cards stack on the right */
  .cs-card,
  .cs-card--left,
  .cs-card--right {
    width: calc(100% - 50px);
    margin-left: 50px;
    margin-right: 0;
  }
  /* dot stays on the left line */
  .cs-card--left::after,
  .cs-card--right::after {
    left: -43px;
    right: auto;
  }
  /* connector points left */
  .cs-card--left::before,
  .cs-card--right::before {
    left: -30px;
    right: auto;
  }
  /* step badge stays top-left */
  .cs-step-num {
    top: -18px;
    left: -18px;
  }
}
