/* ==========================================================================
   NEXTGEN TECHEDGE CASE STUDIES - DESIGN SYSTEM (LIGHT THEME)
   ========================================================================== */

/* Breadcrumb Navigation */
.case-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.case-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.case-breadcrumb a:hover {
  color: var(--brand-purple);
}

.case-breadcrumb .sep {
  color: var(--text-dim);
}

.case-breadcrumb [aria-current="page"] {
  color: var(--brand-purple);
}

/* ==========================================================================
   1. CASE STUDIES LISTING HERO & FEATURED BANNER
   ========================================================================== */
.case-listing-hero {
  padding: 150px 0 60px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfd 60%, #f4f6fa 100%);
  border-bottom: 1px solid var(--border-light);
}

.case-listing-h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.12;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
  max-width: 900px;
}

.case-listing-lead {
  font-size: 1.2rem;
  color: var(--text-body);
  line-height: 1.65;
  max-width: 820px;
  margin-bottom: 44px;
}

/* Featured Case Banner */
.featured-case-banner {
  background: #ffffff;
  border: 1.5px solid var(--border-brand);
  border-radius: 24px;
  padding: 44px;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(132, 38, 176, 0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.featured-case-banner:hover {
  border-color: var(--brand-purple);
  box-shadow: var(--shadow-xl), 0 0 40px rgba(132, 38, 176, 0.12);
}

.featured-case-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--brand-gradient);
}

.featured-case-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-purple);
  background: rgba(132, 38, 176, 0.08);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.featured-case-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.22;
  margin-bottom: 14px;
}

.featured-case-title a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s;
}

.featured-case-title a:hover {
  color: var(--brand-purple);
}

.featured-case-desc {
  font-size: 1.05rem;
  color: var(--text-body);
  line-height: 1.65;
  max-width: 860px;
  margin-bottom: 22px;
}

.featured-case-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   2. CATEGORY FILTER BAR & CARDS GRID
   ========================================================================== */
.case-cards-section {
  padding: 60px 0 110px;
  background: var(--bg-surface);
}

.case-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 44px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}

.case-filter-btn {
  background: #ffffff;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.case-filter-btn:hover {
  color: var(--brand-purple);
  border-color: var(--brand-purple);
  transform: translateY(-1px);
}

.case-filter-btn.active,
.case-filter-btn.active:hover {
  background: var(--brand-gradient);
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: var(--brand-glow);
}

.case-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 28px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.case-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

.case-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 14px;
  background: transparent;
  pointer-events: auto;
}

.case-card:hover {
  transform: translateY(-6px);
  border-color: var(--brand-purple);
  box-shadow: var(--shadow-xl);
}

.case-card-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
  width: 100%;
  max-width: 100%;
}

.case-card-cat {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-purple);
}

.case-card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(132, 38, 176, 0.08);
  color: var(--brand-purple);
  white-space: normal;
  display: inline-block;
  line-height: 1.35;
}

.case-card-badge.archived {
  background: #f1f5f9;
  color: var(--text-muted);
}

.case-card-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text-main);
}

.case-card-title a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s;
}

.case-card-title a:hover {
  color: var(--brand-purple);
}

.case-card-teaser {
  font-size: 0.94rem;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 22px;
  flex: 1;
}

.case-card-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.case-card-tech {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  background: var(--bg-surface);
  border-radius: 12px;
  color: var(--text-body);
  border: 1px solid var(--border-light);
}

.case-card-footer {
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}

.case-card-link {
  color: var(--brand-purple);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s;
}

.case-card-link:hover {
  transform: translateX(4px);
  color: var(--brand-coral);
}

.case-filter-empty {
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border-radius: 20px;
  border: 1px dashed var(--border-light);
}

/* ==========================================================================
   3. CASE STUDY DETAIL PAGE LAYOUT
   ========================================================================== */
.case-detail-hero {
  padding: 150px 0 70px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfd 60%, #f4f6fa 100%);
  border-bottom: 1px solid var(--border-light);
}

.detail-hero-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 18px;
}

.detail-cat-badge {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-purple);
}

.detail-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 14px;
  background: rgba(132, 38, 176, 0.08);
  color: var(--brand-purple);
}

.detail-status-badge.archived {
  background: #f1f5f9;
  color: var(--text-muted);
}

.detail-h1 {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.16;
  color: var(--text-main);
  margin-bottom: 22px;
  letter-spacing: -0.025em;
  max-width: 1040px;
}

.detail-hero-sub {
  font-size: 1.25rem;
  color: var(--text-body);
  line-height: 1.65;
  max-width: 900px;
  margin-bottom: 30px;
}

.detail-approved-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.fact-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-purple);
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 6px 16px;
  box-shadow: var(--shadow-sm);
}

.fact-chip .check {
  color: var(--brand-coral);
  font-weight: 900;
}

/* Detail Body & Sticky Sidebar */
.case-detail-body {
  padding: 70px 0 100px;
  background: #ffffff;
}

.case-detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  align-items: start;
}

.case-sidebar {
  position: relative;
}

.sticky-toc {
  position: sticky;
  top: 110px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}

.toc-title {
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-main);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.toc-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s;
  display: block;
  padding: 4px 0;
}

.toc-list a:hover {
  color: var(--brand-purple);
  transform: translateX(4px);
}

.toc-meta-box {
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}

.meta-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.meta-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Detail Main Content */
.case-main-content {
  min-width: 0;
}

.detail-section {
  margin-bottom: 60px;
}

.detail-section-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.detail-prose p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-body);
  margin-bottom: 20px;
}

.detail-prose strong {
  color: var(--text-main);
}

.detail-prose ul,
.detail-prose ol {
  margin: 0 0 20px 22px;
  padding-left: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--text-body);
}

.detail-prose ul ul,
.detail-prose ol ol {
  margin: 10px 0 4px 20px;
}

.detail-prose code {
  background: rgba(132, 38, 176, 0.08);
  color: var(--brand-purple);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.9em;
}

/* ==========================================================================
   4. CONCEPTUAL ARCHITECTURE DIAGRAM (SVG / CSS FLOW)
   ========================================================================== */
.diagram-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 22px;
  padding: 38px 32px;
  box-shadow: var(--shadow-sm);
  margin-top: 16px;
}

.diagram-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.diagram-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.diagram-disclaimer {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #ffffff;
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.diagram-flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.diagram-node {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: 48px 1.4fr 2fr;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.diagram-node:hover {
  border-color: var(--brand-purple);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.diagram-step-badge {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--brand-purple);
  background: rgba(132, 38, 176, 0.08);
  height: 38px;
  width: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
}

.diagram-node-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.diagram-node-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.diagram-connector {
  display: flex;
  justify-content: center;
  color: var(--brand-purple);
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1;
}

.diagram-caption {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 24px;
  text-align: center;
}

/* ==========================================================================
   5. CAPABILITIES LIST & TECH STACK
   ========================================================================== */
.capabilities-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.capability-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.2s;
}

.capability-item:hover {
  border-color: var(--brand-purple);
  background: #ffffff;
  transform: translateX(4px);
}

.capability-bullet {
  color: #ffffff;
  background: var(--brand-gradient);
  font-weight: 900;
  font-size: 0.78rem;
  height: 24px;
  width: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.capability-text {
  font-size: 0.98rem;
  color: var(--text-body);
  font-weight: 600;
  line-height: 1.55;
}

.tech-stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   6. EDITORIAL GOVERNANCE & VERIFICATION GATE
   ========================================================================== */
.governance-box {
  background: #fffdfa;
  border: 1.5px solid #fed7aa;
  border-radius: 20px;
  padding: 34px 30px;
  box-shadow: var(--shadow-sm);
}

.governance-header {
  margin-bottom: 14px;
}

.gov-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #c2410c;
  background: #ffedd5;
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.gov-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #9a3412;
}

.gov-desc {
  font-size: 0.94rem;
  color: #7c2d12;
  line-height: 1.65;
  margin-bottom: 22px;
}

.governance-claims-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.governance-claim-row {
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.claim-metric {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  min-width: 150px;
  font-family: 'Space Grotesk', sans-serif;
}

.claim-details {
  flex: 1;
}

.claim-ctx {
  font-size: 0.88rem;
  color: var(--text-body);
  font-weight: 600;
}

.claim-src {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.claim-status {
  color: #c2410c;
  font-weight: 700;
}

/* ==========================================================================
   7. RELATED CASE STUDIES
   ========================================================================== */
.related-studies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-study-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s;
}

.related-study-card:hover {
  border-color: var(--brand-purple);
  background: #ffffff;
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.rel-cat {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--brand-purple);
  margin-bottom: 8px;
}

.rel-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 8px;
}

.rel-teaser {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.rel-arrow {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-purple);
}

/* ==========================================================================
   RESPONSIVE DESIGN & ACCESSIBILITY
   ========================================================================== */
@media (max-width: 1024px) {
  .case-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .case-detail-grid { grid-template-columns: 1fr; }
  .sticky-toc { display: none; }
  .diagram-node { grid-template-columns: 40px 1fr; }
  .diagram-node-desc { grid-column: 1 / -1; }
  .related-studies-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .case-listing-h1 { font-size: 2.5rem; }
  .detail-h1 { font-size: 2.3rem; }
  .case-cards-section {
    padding: 36px 0 60px;
  }
  .case-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .case-card {
    padding: 24px 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    border-radius: 18px !important;
  }
  .case-card-top {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .case-card-cat {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    line-height: 1.35 !important;
  }
  .case-card-badge {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    display: inline-block !important;
    max-width: 100% !important;
    line-height: 1.35 !important;
  }
  .case-card-title {
    font-size: 1.25rem !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    line-height: 1.3 !important;
  }
  .case-card-teaser {
    font-size: 0.9rem !important;
    line-height: 1.55 !important;
    margin-bottom: 18px !important;
    overflow-wrap: break-word !important;
  }
  .case-filter-bar {
    gap: 8px !important;
    margin-bottom: 28px !important;
    padding-bottom: 14px !important;
  }
  .case-filter-btn {
    padding: 8px 16px !important;
    font-size: 0.82rem !important;
  }
  .governance-claim-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .diagram-node { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .case-card {
    padding: 20px 16px !important;
    border-radius: 16px !important;
  }
  .case-card-title {
    font-size: 1.15rem !important;
  }
  .diagram-node {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ==========================================================================
   PORTFOLIO EXPANSION: GALLERIES, DISCLAIMERS & LIGHTBOX MODAL
   ========================================================================== */

/* Disclaimer & Scope Callout Box */
.detail-disclaimer-box {
  background: #ffffff;
  border: 1.5px solid rgba(132, 38, 176, 0.25);
  border-left: 5px solid var(--brand-purple);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 28px 0;
  box-shadow: 0 4px 16px rgba(132, 38, 176, 0.05);
}

.detail-disclaimer-box.warning {
  border-left-color: #df414c;
  background: #fffafa;
}

.detail-disclaimer-box.info {
  border-left-color: #00d4aa;
  background: #f7fdfc;
}

.disclaimer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-purple);
  margin-bottom: 8px;
}

.detail-disclaimer-box.warning .disclaimer-badge {
  color: #df414c;
}

.detail-disclaimer-box.info .disclaimer-badge {
  color: #02755e;
}

.disclaimer-text {
  font-size: 0.92rem;
  color: var(--text-body);
  line-height: 1.6;
  margin: 0;
}

/* Genuine Screenshot Gallery */
.case-gallery-section {
  margin-top: 36px;
}

.case-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 20px;
}

.case-gallery-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  cursor: pointer;
}

.case-gallery-card:hover {
  border-color: var(--brand-purple);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 20px rgba(132, 38, 176, 0.1);
}

.case-gallery-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #171126;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-gallery-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.case-gallery-card:hover .case-gallery-thumb-wrap img {
  transform: scale(1.03);
}

.case-gallery-zoom-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(23, 17, 38, 0.85);
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(4px);
  opacity: 0.9;
  transition: opacity 0.2s;
}

.case-gallery-card:hover .case-gallery-zoom-badge {
  opacity: 1;
  background: var(--brand-purple);
}

.case-gallery-caption {
  padding: 16px 18px;
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.5;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  flex: 1;
}

/* Lightbox Modal */
.case-lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 10, 25, 0.92);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.case-lightbox-modal.active {
  display: flex;
}

.case-lightbox-content {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: lightboxFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.case-lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #120e1e;
}

.case-lightbox-caption {
  margin-top: 14px;
  color: #f1f5f9;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
  max-width: 800px;
}

.case-lightbox-close {
  position: absolute;
  top: -46px;
  right: 0;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  font-size: 1.6rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.case-lightbox-close:hover {
  background: var(--brand-purple);
  transform: rotate(90deg);
}

/* Responsive SVG Diagram Container */
.case-architecture-svg-wrap {
  width: 100%;
  margin: 24px 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(132, 38, 176, 0.25);
  background: #171126;
}

.case-architecture-svg-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .case-gallery-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   EXTERNAL PROJECT WEBSITE ACTION BUTTONS (RESTOVUE & DUET)
   ========================================================================== */
.external-project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-gradient);
  color: #ffffff !important;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 15px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  box-shadow: 0 4px 12px rgba(132, 38, 176, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.external-project-link:hover {
  background: var(--brand-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(132, 38, 176, 0.35);
  color: #ffffff !important;
}

.external-project-link:focus-visible {
  outline: 2px solid var(--brand-fuchsia);
  outline-offset: 3px;
}

.external-project-link svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.external-project-link:hover svg {
  transform: translate(2px, -2px);
}

.external-hero-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-gradient);
  color: #ffffff !important;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 30px;
  text-decoration: none;
  border: 1px solid transparent;
  box-shadow: var(--brand-glow);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.external-hero-link:hover {
  background: var(--brand-gradient-hover);
  transform: translateY(-2px);
  box-shadow: var(--brand-glow-lg);
  color: #ffffff !important;
}

.external-hero-link:focus-visible {
  outline: 2px solid var(--brand-fuchsia);
  outline-offset: 3px;
}

.external-hero-link svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.external-hero-link:hover svg {
  transform: translate(2px, -2px);
}

.external-cta-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 30px;
  text-decoration: none;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.external-cta-outline:hover {
  background: #ffffff;
  color: var(--brand-purple) !important;
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.external-cta-outline svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.external-cta-outline:hover svg {
  transform: translate(2px, -2px);
}

@media (prefers-reduced-motion: reduce) {
  .external-project-link,
  .external-project-link:hover,
  .external-project-link svg,
  .external-project-link:hover svg,
  .external-hero-link,
  .external-hero-link:hover,
  .external-hero-link svg,
  .external-hero-link:hover svg,
  .external-cta-outline,
  .external-cta-outline:hover,
  .external-cta-outline svg,
  .external-cta-outline:hover svg {
    transition: none !important;
    transform: none !important;
  }
}


/* ========================================================================
   CuePrompt GSAP Hero Perspective Phone Carousel
   ======================================================================== */
.cue-hero-carousel {
  margin: 32px auto 26px;
  max-width: 920px;
  width: 100%;
  text-align: center;
}

.cue-hero-stage {
  position: relative;
  width: 100%;
  height: 510px;
  overflow: hidden;
  border-radius: 22px;
  background: radial-gradient(circle at 50% 44%, rgba(132, 38, 176, 0.08) 0%, rgba(223, 65, 76, 0.04) 48%, rgba(248, 250, 252, 0.92) 100%);
  border: 1px solid var(--border-light, #e2e8f0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 10px 30px rgba(15, 23, 42, 0.05);
  touch-action: pan-y;
}

.cue-hero-phone {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 212px;
  padding: 5px;
  border-radius: 26px;
  background: #0f172a;
  border: 1.5px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
  cursor: pointer;
  will-change: transform, opacity;
  transform-origin: center center;
  box-sizing: border-box;
  outline: none;
}

.cue-hero-phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 21px;
  background: #ffffff;
  user-select: none;
  -webkit-user-drag: none;
}

.cue-hero-phone.is-center {
  cursor: default;
  box-shadow: 0 28px 58px rgba(15, 23, 42, 0.28), 0 0 0 1.5px rgba(223, 65, 76, 0.35);
}

.cue-hero-phone:focus-visible {
  box-shadow: 0 0 0 3px var(--brand-purple), 0 22px 44px rgba(15, 23, 42, 0.24);
}

.cue-hero-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}

.cue-hero-nav {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-light, #e2e8f0);
  background: #ffffff;
  color: var(--text-main, #0f172a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.cue-hero-nav:hover {
  border-color: var(--brand-purple);
  color: var(--brand-purple);
  transform: translateY(-1px);
}

.cue-hero-nav:focus-visible {
  outline: 2px solid var(--brand-purple);
  outline-offset: 2px;
}

.cue-hero-dots {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cue-hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 99px;
  background: #cbd5e1;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.cue-hero-dot.active {
  width: 24px;
  background: var(--brand-gradient);
}

.cue-hero-caption {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 12px auto 0;
  max-width: 720px;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 768px) {
  .cue-hero-stage {
    height: 430px;
    border-radius: 18px;
  }
  .cue-hero-phone {
    width: 174px;
    padding: 4px;
    border-radius: 22px;
  }
  .cue-hero-phone img {
    border-radius: 18px;
  }
}

@media (max-width: 520px) {
  .cue-hero-stage {
    height: 356px;
    border-radius: 16px;
  }
  .cue-hero-phone {
    width: 138px;
    padding: 4px;
    border-radius: 18px;
  }
  .cue-hero-phone img {
    border-radius: 14px;
  }
}
