/* ============ Container & Layout ============ */
.cs {
  position: relative;
  z-index: 2;
  width: 100%;
}

.cs-cover,
.cs-section,
.cs-cta,
.cs-nextprev {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.cs-cover {
  padding: clamp(60px, 10vw, 100px) var(--gutter);
}

.cs-section {
  padding: clamp(80px, 12vw, 120px) var(--gutter);
}

.cs-wave {
  display: block;
  width: 100%;
  height: auto;
  margin: -2px 0 0 0;
  z-index: 3;
}

/* ============ Cover extras ============ */
.cs-client-line {
  font-family: 'Parkinsans', sans-serif;
  font-size: clamp(10px, 1.2vw, 13px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: clamp(12px, 2vw, 18px);
}

.cs-eyebrow {
  display: inline-block;
  font-size: clamp(9px, 1vw, 11px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 600;
  margin-bottom: clamp(12px, 2vw, 18px);
}

.cs-title {
  font-family: var(--display);
  font-size: clamp(36px, 7vw, 80px);
  font-weight: 400;
  color: var(--text);
  line-height: 1.1;
  margin: clamp(12px, 2vw, 20px) 0 clamp(14px, 2.5vw, 24px);
  word-break: break-word;
}

.cs-tagline {
  font-size: clamp(14px, 1.5vw, 18px);
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 0 clamp(24px, 4vw, 36px);
  line-height: 1.6;
}

.cs-meta {
  list-style: none;
  padding: 0;
  margin: clamp(28px, 4vw, 40px) 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(16px, 3vw, 24px);
}

.cs-meta li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-meta span {
  font-size: clamp(8px, 1vw, 10px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 600;
}

.cs-meta strong {
  font-size: clamp(13px, 1.3vw, 16px);
  color: var(--text);
  font-weight: 400;
}

/* ============ Image Styling ============ */
.cs-hero-image,
.cs-image {
  position: relative;
  display: block;
  margin: clamp(40px, 6vw, 60px) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(167,139,250,0.08));
  border: 1px solid var(--border);
}

.cs-hero-image::before,
.cs-image::before {
  content: '';
  display: block;
  padding-bottom: 56.25%; /* 16:9 aspect ratio — only used when no real image */
  background: var(--bg-2);
}

/* When a real image is present, let it drive the height — no forced crop */
.cs-hero-image:has(img[src])::before,
.cs-image:has(img[src])::before {
  display: none;
}

/* Wide image: constrained to page layout width (same gutter as sections) */
.cs-image--wide {
  /* At any viewport:  left/right margin = gutter
     At viewport > --max: margin grows to keep the image centered at max content width
     Formula: max(gutter,  50vw  − (max/2)  + gutter) */
  margin-left:  max(var(--gutter), calc(50% - var(--max) / 2 + var(--gutter)));
  margin-right: max(var(--gutter), calc(50% - var(--max) / 2 + var(--gutter)));
}
.cs-image--wide::before {
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.cs-hero-image img,
.cs-image img {
  position: static;
  width: 100%;
  height: auto;
  display: block;
}

.cs-hero-image:not(:has(img[src])),
.cs-image:not(:has(img[src])) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  background: linear-gradient(135deg, var(--bg-2) 0%, rgba(124,58,237,0.08) 100%);
  color: var(--text-dim);
  font-size: clamp(12px, 1.5vw, 14px);
  text-align: center;
  padding: clamp(32px, 5vw, 48px);
}

.cs-hero-image figcaption,
.cs-image figcaption {
  font-size: clamp(12px, 1.2vw, 14px);
  color: var(--text-dim);
  padding: clamp(12px, 2vw, 18px) 0;
  text-align: left;
  font-style: italic;
}

/* ============ Gallery Styling ============ */
.cs-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(16px, 2.5vw, 24px);
  margin: clamp(40px, 6vw, 60px) var(--gutter);
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  align-items: start; /* each item only as tall as its content — no stretching */
}

.cs-gallery__item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(167,139,250,0.08));
  border: 1px solid var(--border);
}

.cs-gallery__item::before {
  content: '';
  display: block;
  padding-bottom: 60%; /* Default — only active when no real image (placeholder state) */
  background: var(--bg-2);
}

/* When a real image is present: kill the fixed ratio, let the image define the height */
.cs-gallery__item:has(img[src])::before {
  display: none;
}

/* These aspect-ratio hints only apply when there is no real image (placeholder state) */
.cs-gallery__item--lg::before  { padding-bottom: 56.25%; } /* 16:9  */
.cs-gallery__item--md::before  { padding-bottom: 60%;    } /* 5:3   */
.cs-gallery__item--sm::before  { padding-bottom: 66.67%; } /* 3:2   */
.cs-gallery__item--gif::before { padding-bottom: 56.25%; } /* 16:9  */

.cs-gallery--deliverables {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .cs-gallery--deliverables {
    grid-template-columns: 1fr;
  }
}

.cs-gallery__item img {
  position: static;
  height: auto;
  display: block;
}

.cs-gallery__item:not(:has(img[src])) {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-2) 0%, rgba(124,58,237,0.08) 100%);
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
  padding: clamp(24px, 3vw, 32px);
  min-height: 200px;
}

.cs-gallery__item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(12px, 2vw, 18px);
  background: linear-gradient(to top, rgba(14,10,20,0.9), transparent);
  color: var(--text);
  font-size: clamp(11px, 1vw, 13px);
  line-height: 1.4;
}

.cs-gallery__item--offset {
  margin-top: clamp(16px, 2vw, 24px);
}

/* ============ Grid & Section Layout ============ */
.cs-grid {
  display: grid;
}

.cs-grid--split {
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.cs-grid__label {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vw, 18px);
  position: sticky;
  top: clamp(100px, 15vw, 180px);
}

.cs-num {
  font-family: var(--display);
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 400;
  color: var(--lilac);
  line-height: 1;
}

.cs-h2 {
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 400;
  color: var(--text);
  line-height: 1.1;
  margin: 0;
}

.cs-grid__body {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 32px);
}

.cs-lead {
  font-family: var(--display);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 400;
  color: var(--lilac);
  margin: 0;
  line-height: 1.3;
}

.cs-grid__body p {
  font-size: clamp(14px, 1.2vw, 16px);
  color: var(--text-dim);
  line-height: 1.7;
  margin: 0;
}

/* ============ Factlist (overview meta) ============ */
.cs-factlist {
  margin-top: clamp(28px, 4vw, 40px);
  padding-top: clamp(18px, 3vw, 28px);
  border-top: 1px dashed rgba(167, 139, 250, 0.3);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(14px, 2.5vw, 32px) clamp(14px, 3vw, 32px);
}
.cs-factlist > div { 
  display: flex; 
  flex-direction: column; 
  gap: 4px;
}
.cs-factlist dt {
  font-size: clamp(9px, 1vw, 11px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 600;
}
.cs-factlist dd {
  font-size: clamp(12px, 1.5vw, 15px);
  color: var(--text);
  margin: 0;
}

/* ============ Two-column list (Objectives & Challenges) ============ */
.cs-twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 3vw, 24px);
  margin-top: clamp(24px, 4vw, 34px);
}
.cs-twocol__col h3 {
  font-family: var(--display);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 400;
  color: var(--lilac);
  margin-bottom: clamp(12px, 2vw, 18px);
}
.cs-twocol__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cs-twocol__col li {
  position: relative;
  padding: clamp(12px, 2vw, 16px) clamp(14px, 2vw, 20px) clamp(12px, 2vw, 16px) clamp(36px, 5vw, 46px);
  margin-bottom: clamp(8px, 1vw, 10px);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: clamp(16px, 3vw, 20px);
  font-size: clamp(13px, 1.2vw, 15px);
  line-height: 1.55;
  color: var(--text-dim);
  transition: border-color .3s ease, transform .3s ease;
  -webkit-user-select: none;
  user-select: none;
}
.cs-twocol__col li:hover,
.cs-twocol__col li:focus-visible {
  border-color: rgba(167, 139, 250, 0.45);
  transform: translateX(4px);
}
.cs-twocol__col li:focus-visible {
  outline: 2px solid var(--lilac);
  outline-offset: 2px;
}
.cs-twocol__col li::before {
  content: '✦';
  padding-right: 2%;
  left: clamp(14px, 2vw, 20px);
  top: 50%;
  transform: translateY(-50%);
  color: var(--purple);
  font-size: clamp(12px, 1.5vw, 14px);
}

/* ============ Process Steps with Connectors ============ */
.cs-steps {
  list-style: none;
  padding: 0; 
  margin: 0;
  position: relative;
}

.cs-steps li {
  position: relative;
  padding-bottom: clamp(20px, 3vw, 32px);
  margin-bottom: clamp(16px, 3vw, 28px);
}

/* Animated arrow connector between steps */
.cs-steps li:not(:last-child)::after {
  content: '↓';
  position: absolute;
  left: 0;
  bottom: -clamp(18px, 3.5vw, 32px);
  font-size: clamp(16px, 2.2vw, 28px);
  color: var(--purple);
  opacity: 0.6;
  font-weight: 300;
  letter-spacing: 0;
  animation: pulse-arrow 2s ease-in-out infinite;
}

@keyframes pulse-arrow {
  0%, 100% { 
    transform: translateY(0);
    opacity: 0.5;
  }
  50% { 
    transform: translateY(-6px);
    opacity: 0.8;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-steps li:not(:last-child)::after {
    animation: none;
    opacity: 0.6;
  }
}

.cs-steps__dot {
  display: inline-block;
  width: clamp(8px, 1.2vw, 12px);
  height: clamp(8px, 1.2vw, 12px);
  border-radius: 50%;
  background: var(--purple);
  margin-right: clamp(12px, 1.5vw, 16px);
  vertical-align: top;
  margin-top: 2px;
}

.cs-steps__num {
  display: inline-block;
  font-family: 'Parkinsans', sans-serif;
  font-size: clamp(8px, 1vw, 10px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 600;
  margin-bottom: clamp(2px, 0.5vw, 4px);
}

.cs-steps h3 {
  font-family: var(--display);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 400;
  color: var(--text);
  margin: 0 0 clamp(6px, 1vw, 10px);
  line-height: 1.1;
}

.cs-steps p {
  font-size: clamp(13px, 1.2vw, 15px);
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0;
}

/* ============ Deliverables ============ */
.cs-deliverables {
  display: grid;
  gap: clamp(12px, 2vw, 16px);
  margin-top: clamp(16px, 3vw, 20px);
}
.cs-deliverable {
  position: relative;
  padding: clamp(20px, 3vw, 30px) clamp(20px, 3vw, 32px) clamp(20px, 3vw, 30px) clamp(20px, 5vw, 96px);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: clamp(20px, 4vw, 28px);
  transition: border-color .3s ease, transform .3s ease;
  -webkit-user-select: none;
  user-select: none;
}
.cs-deliverable:hover,
.cs-deliverable:focus-within {
  border-color: rgba(167, 139, 250, 0.5);
  transform: translateY(-2px);
}
.cs-deliverable:focus-within {
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}
.cs-deliverable__num {
  left: clamp(20px, 3vw, 30px);
  top: clamp(20px, 3vw, 28px);
  font-family: var(--display);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 400;
  line-height: 1;
  color: var(--lilac);
}
.cs-deliverable h3 {
  font-family: var(--display);
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 400;
  color: var(--text);
  margin-bottom: clamp(4px, 1vw, 6px);
}
.cs-deliverable p {
  font-size: clamp(13px, 1.2vw, 15px);
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0 !important;
}

/* ============ Tech stack pills ============ */
.cs-tech {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(8px, 1.5vw, 10px);
  margin-top: clamp(32px, 5vw, 44px);
  padding-top: clamp(20px, 3vw, 30px);
  border-top: 1px dashed rgba(167, 139, 250, 0.3);
}
.cs-tech__label {
  width: 100%;
  font-size: clamp(9px, 1vw, 11px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 600;
  margin-bottom: clamp(4px, 1vw, 6px);
}
.cs-tech__pill {
  padding: clamp(8px, 1.2vw, 10px) clamp(14px, 2.5vw, 20px);
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.32);
  border-radius: 999px;
  font-size: clamp(11px, 1.2vw, 13px);
  color: var(--text);
  transition: background .3s ease, border-color .3s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
  outline-offset: 2px;
}
.cs-tech__pill:hover,
.cs-tech__pill:focus-visible {
  background: rgba(167, 139, 250, 0.18);
  border-color: rgba(167, 139, 250, 0.55);
}
.cs-tech__pill:focus-visible {
  outline: 2px solid var(--purple);
}

/* ============ Live project CTA ============ */
.cs-cta {
  max-width: var(--max);
  margin: clamp(30px, 5vw, 40px) auto;
  padding: clamp(30px, 4vw, 40px) var(--gutter);
}
.cs-cta__inner {
  position: relative;
  padding: clamp(40px, 8vw, 80px) clamp(30px, 5vw, 50px);
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: clamp(32px, 5vw, 44px);
  text-align: center;
  overflow: hidden;
}
.cs-cta__inner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.28) 0%, transparent 70%);
  filter: blur(70px);
  pointer-events: none;
}
.cs-cta__label {
  position: relative;
  display: inline-block;
  font-size: clamp(10px, 1.2vw, 12px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: clamp(12px, 2vw, 16px);
  padding: clamp(6px, 1vw, 8px) clamp(12px, 2vw, 16px);
  border: 1px solid rgba(167, 139, 250, 0.4);
  border-radius: 999px;
}
.cs-cta__title {
  position: relative;
  font-family: var(--display);
  font-size: clamp(32px, 6vw, 84px);
  font-weight: 400;
  color: var(--text);
  line-height: 1;
  margin-bottom: clamp(16px, 3vw, 22px);
  background: linear-gradient(180deg, #FFFFFF 0%, var(--lilac) 60%, #BFA6FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  padding: 0.08em 0 0.2em;
  word-break: break-word;
}
.cs-cta__text {
  position: relative;
  max-width: 560px;
  margin: 0 auto clamp(24px, 4vw, 36px);
  font-size: clamp(14px, 1.2vw, 16px);
  color: var(--text-dim);
  line-height: 1.65;
}
.cs-cta__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1vw, 12px);
  padding: clamp(14px, 1.5vw, 18px) clamp(28px, 4vw, 38px);
  background: var(--lilac);
  color: #1A0F2E;
  font-weight: 600;
  font-size: clamp(13px, 1.2vw, 15px);
  border-radius: 999px;
  box-shadow: 0 0 32px -6px rgba(232, 221, 255, 0.55);
  transition: transform .3s ease, box-shadow .3s ease;
  min-height: 44px;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
.cs-cta__button:hover,
.cs-cta__button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 48px -2px rgba(232, 221, 255, 0.9);
}
.cs-cta__button:focus-visible {
  outline: 2px solid #1A0F2E;
  outline-offset: 2px;
}

/* ============ Responsive additions ============ */
@media (max-width: 1024px) {
  .cs-grid--split {
    grid-template-columns: 1fr;
    gap: clamp(24px, 4vw, 40px);
  }
  
  .cs-grid__label {
    position: relative;
    top: auto;
  }
  
  .cs-cover,
  .cs-section {
    padding: clamp(60px, 8vw, 100px) var(--gutter);
  }
  
  .cs-twocol { 
    grid-template-columns: 1fr;
  }
  .cs-factlist { 
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .cs-cover {
    padding: clamp(40px, 6vw, 60px) var(--gutter);
  }
  
  .cs-section {
    padding: clamp(60px, 8vw, 80px) var(--gutter);
  }
  
  .cs-num {
    font-size: clamp(28px, 6vw, 48px);
  }
  
  .cs-h2 {
    font-size: clamp(24px, 4vw, 32px);
  }
  
  .cs-lead {
    font-size: clamp(16px, 2vw, 20px);
  }
  
  .cs-hero-image,
  .cs-image {
    margin: clamp(32px, 4vw, 48px) 0;
  }
  
  .cs-hero-image::before,
  .cs-image::before,
  .cs-image--wide::before {
    padding-bottom: 60%;
  }
  
  .cs-gallery {
    grid-template-columns: 1fr;
    margin: clamp(32px, 4vw, 48px) var(--gutter);
    gap: clamp(12px, 2vw, 16px);
  }
  
  .cs-gallery__item--offset {
    margin-top: 0;
  }
  
  .cs-deliverable {
    padding: clamp(16px, 2.5vw, 26px) clamp(16px, 2.5vw, 24px);
  }
  .cs-deliverable__num {
    position: static;
    display: block;
    margin-bottom: clamp(8px, 1.5vw, 10px);
    font-size: clamp(24px, 5vw, 34px);
  }
  .cs-steps li {
    padding-bottom: clamp(16px, 2.5vw, 24px);
    margin-bottom: clamp(12px, 2vw, 20px);
  }
  .cs-steps li:not(:last-child)::after {
    font-size: clamp(14px, 1.8vw, 20px);
    bottom: -clamp(12px, 2vw, 20px);
  }
  .cs-cta { 
    padding: clamp(20px, 3vw, 30px) var(--gutter);
  }
  .cs-cta__inner { 
    padding: clamp(36px, 5vw, 54px) clamp(18px, 3vw, 26px);
    border-radius: clamp(24px, 4vw, 32px);
  }
}

@media (max-width: 640px) {
  .cs-meta {
    grid-template-columns: 1fr;
  }
  
  .cs-gallery {
    grid-template-columns: 1fr;
  }
  
  .cs-hero-image,
  .cs-image {
    margin: clamp(24px, 3vw, 32px) 0;
  }
  
  .cs-hero-image::before,
  .cs-image--wide::before {
    padding-bottom: 55%;
  }
}

@media (max-width: 480px) {
  .cs-cover {
    padding: clamp(32px, 5vw, 48px) 16px;
  }
  
  .cs-section {
    padding: clamp(48px, 6vw, 64px) 16px;
  }
  
  .cs-hero-image,
  .cs-image {
    margin: clamp(20px, 2.5vw, 24px) 0;
  }
  
  .cs-hero-image:not(:has(img[src])),
  .cs-image:not(:has(img[src])) {
    min-height: 180px;
    padding: clamp(20px, 3vw, 24px);
  }
  
  .cs-gallery {
    margin: clamp(20px, 2.5vw, 24px) 16px;
    gap: clamp(8px, 1.5vw, 12px);
  }
  
  .cs-twocol__col li {
    padding-left: clamp(14px, 2vw, 20px);
  }
  .cs-twocol__col li::before {
    transform: translateY(-50%);
  }
}

/* ============================================================
   ADDITIONS — design polish & missing pieces
   ============================================================ */

/* ---- Cover: needs position:relative for blobs to anchor ---- */
.cs-cover {
  position: relative;
}

/* ---- Cover atmospheric blobs ---- */
.cs-cover__blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.cs-cover__blob--1 {
  width: clamp(300px, 45vw, 640px);
  height: clamp(300px, 45vw, 640px);
  background: radial-gradient(circle, rgba(124, 58, 237, 0.32) 0%, transparent 68%);
  filter: blur(90px);
  top: -15%;
  right: -5%;
}
.cs-cover__blob--2 {
  width: clamp(200px, 30vw, 420px);
  height: clamp(200px, 30vw, 420px);
  background: radial-gradient(circle, rgba(167, 139, 250, 0.18) 0%, transparent 70%);
  filter: blur(72px);
  bottom: 5%;
  left: -8%;
}
/* Cover text sits above blobs */
.cs-cover > :not(.cs-cover__blob) {
  position: relative;
  z-index: 1;
}

/* ---- Wave divider fill ---- */
.cs-wave path {
  fill: var(--bg-2);
}

/* ---- Tinted alternating sections ---- */
.cs-section--tinted {
  background: var(--bg-2);
}


/* ---- Reading progress bar ---- */
.cs-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--progress, 0%);
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--lilac));
  z-index: 200;
  pointer-events: none;
  transition: width 0.1s linear;
  transform-origin: left;
}

/* ---- Scroll-reveal system ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger within deliverables */
.cs-deliverable[data-reveal]:nth-child(2) { transition-delay: 100ms; }
.cs-deliverable[data-reveal]:nth-child(3) { transition-delay: 200ms; }
/* Stagger within metrics */
.cs-metric[data-reveal]:nth-child(2)      { transition-delay: 100ms; }
.cs-metric[data-reveal]:nth-child(3)      { transition-delay: 200ms; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- Outcomes / Metrics section ---- */
.cs-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.8vw, 16px);
  margin: clamp(24px, 4vw, 36px) 0;
}
.cs-metric {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vw, 10px);
  padding: clamp(20px, 2.5vw, 28px) clamp(16px, 2vw, 22px);
  background: rgba(167, 139, 250, 0.05);
  border: 1px solid var(--border);
  border-radius: clamp(16px, 2.5vw, 22px);
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.cs-metric:hover {
  border-color: rgba(167, 139, 250, 0.45);
  transform: translateY(-3px);
}
.cs-metric__num {
  font-family: var(--display);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 400;
  line-height: 1;
  background: linear-gradient(140deg, #FFFFFF 0%, var(--lilac) 55%, #BFA6FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: block;
}
.cs-metric__label {
  font-size: clamp(11px, 1.1vw, 13px);
  color: var(--text-dim);
  line-height: 1.45;
}
@media (max-width: 640px) {
  .cs-metrics { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .cs-metrics { grid-template-columns: 1fr; }
}

/* ---- Next / Prev project navigation ---- */
.cs-nextprev {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(16px, 2.5vw, 24px);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) var(--gutter);
  border-top: 1px solid var(--border);
}
.cs-nextprev__link {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.8vw, 8px);
  padding: clamp(20px, 2.5vw, 28px);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: clamp(16px, 2.5vw, 22px);
  transition: border-color 0.3s ease, transform 0.3s ease, background 0.3s ease;
  min-height: 80px;
}
.cs-nextprev__link:hover,
.cs-nextprev__link:focus-visible {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(167, 139, 250, 0.06);
  transform: translateY(-3px);
}
.cs-nextprev__link:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}
.cs-nextprev__link--next { text-align: right; }
.cs-nextprev__label {
  font-size: clamp(9px, 1vw, 11px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 600;
}
.cs-nextprev__title {
  font-family: var(--display);
  font-size: clamp(15px, 2vw, 22px);
  font-weight: 400;
  color: var(--text);
  line-height: 1.2;
}
.cs-nextprev__home {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(48px, 6vw, 64px);
  height: clamp(48px, 6vw, 64px);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: clamp(16px, 2vw, 22px);
  color: var(--text-dim);
  background: var(--bg-2);
  flex-shrink: 0;
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.35s ease;
}
.cs-nextprev__home:hover,
.cs-nextprev__home:focus-visible {
  border-color: rgba(167, 139, 250, 0.5);
  color: var(--lilac);
  transform: scale(1.1) rotate(30deg);
}
.cs-nextprev__home:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .cs-nextprev {
    grid-template-columns: 1fr 1fr;
  }
  .cs-nextprev__home {
    grid-column: 1 / -1;
    justify-self: center;
    order: -1;
    margin-bottom: clamp(8px, 2vw, 16px);
  }
}

/* ============================================================
   GSAP Ad Embeds
   ============================================================ */
.cs-embed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2vw, 20px);
  max-width: var(--max);
  margin: clamp(32px, 5vw, 48px) auto;
  padding: 0 var(--gutter);
}
.cs-embed {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-2);
  transition: border-color .3s ease;
}
.cs-embed:not(.cs-embed--pending):hover {
  border-color: rgba(167,139,250,.45);
}

/* Label bar */
.cs-embed__label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: clamp(8px, 1.2vw, 12px) clamp(12px, 2vw, 18px);
  font-family: 'Parkinsans', sans-serif;
  font-size: clamp(9px, 1vw, 11px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

/* Live indicator dot */
.cs-embed__dot--live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,.6);
  flex-shrink: 0;
  animation: embed-live-pulse 2.4s ease-in-out infinite;
}
@keyframes embed-live-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(74,222,128,.6); }
  50%  { box-shadow: 0 0 0 5px rgba(74,222,128,0);  }
  100% { box-shadow: 0 0 0 0   rgba(74,222,128,0);  }
}
@media (prefers-reduced-motion: reduce) {
  .cs-embed__dot--live { animation: none; }
}

/* 16:9 aspect-ratio wrapper */
.cs-embed__wrap {
  position: relative;
  padding-bottom: 56.25%;
}
.cs-embed__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Pending / placeholder state */
.cs-embed--pending .cs-embed__wrap {
  background: linear-gradient(135deg, var(--bg-2) 0%, rgba(124,58,237,.06) 100%);
}
.cs-embed__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1vw, 10px);
  padding: clamp(16px, 2vw, 24px);
  border: 2px dashed rgba(167,139,250,.22);
  border-radius: inherit;
  text-align: center;
}
.cs-embed__placeholder-icon {
  font-size: clamp(22px, 3vw, 32px);
  color: rgba(167,139,250,.4);
  line-height: 1;
}
.cs-embed__placeholder-text {
  font-family: 'Parkinsans', sans-serif;
  font-size: clamp(12px, 1.2vw, 14px);
  color: var(--text-dim);
  font-weight: 500;
}
.cs-embed__placeholder-hint {
  font-family: 'Parkinsans', sans-serif;
  font-size: clamp(10px, 1vw, 11px);
  color: rgba(167,139,250,.5);
  letter-spacing: 0.04em;
}

/* Responsive */
@media (max-width: 900px) {
  .cs-embed-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   YouTube Video Grid
   ============================================================ */
.cs-video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2vw, 20px);
  max-width: var(--max);
  margin: clamp(32px, 5vw, 48px) auto;
  padding: 0 var(--gutter);
}
.cs-video {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-2);
  transition: border-color .3s ease;
}
.cs-video:not(.cs-video--pending):hover {
  border-color: rgba(167,139,250,.45);
}
.cs-video__label {
  padding: clamp(8px, 1.2vw, 12px) clamp(12px, 2vw, 18px);
  font-family: 'Parkinsans', sans-serif;
  font-size: clamp(9px, 1vw, 11px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.cs-video__wrap {
  position: relative;
  padding-bottom: 56.25%;
}
.cs-video__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Pending / placeholder state */
.cs-video--pending .cs-video__wrap {
  background: linear-gradient(135deg, var(--bg-2) 0%, rgba(124,58,237,.06) 100%);
}
.cs-video__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1vw, 12px);
  padding: clamp(16px, 2vw, 24px);
  border: 2px dashed rgba(167,139,250,.22);
  border-radius: inherit;
  text-align: center;
}
.cs-video__play {
  font-size: clamp(24px, 3.5vw, 38px);
  color: rgba(167,139,250,.4);
  line-height: 1;
}
.cs-video__placeholder-text {
  font-family: 'Parkinsans', sans-serif;
  font-size: clamp(12px, 1.2vw, 14px);
  color: var(--text-dim);
  font-weight: 500;
}
.cs-video__placeholder-hint {
  font-family: 'Parkinsans', sans-serif;
  font-size: clamp(10px, 1vw, 11px);
  color: rgba(167,139,250,.5);
  letter-spacing: 0.04em;
}

/* Responsive */
@media (max-width: 900px) {
  .cs-video-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Visible Asset Placeholder
   ============================================================ */

/* Fix: figures/gallery items with .cs-placeholder need block display
   (the :not(:has(img[src])) rule changes them to flex which breaks
   the ::before padding-bottom aspect-ratio trick) */
.cs-hero-image:has(.cs-placeholder),
.cs-image:has(.cs-placeholder),
.cs-gallery__item:has(.cs-placeholder) {
  display: block;
}

.cs-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.2vw, 14px);
  padding: clamp(20px, 3vw, 32px);
  text-align: center;
  background: linear-gradient(135deg, rgba(124,58,237,0.07) 0%, rgba(167,139,250,0.04) 100%);
  border: 1.5px dashed rgba(167,139,250,0.28);
  border-radius: inherit;
}
.cs-placeholder[data-type]::before {
  content: attr(data-type);
  font-family: 'Parkinsans', sans-serif;
  font-size: clamp(8px, 1vw, 10px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 600;
}
.cs-placeholder__icon {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1;
  color: rgba(167,139,250,0.35);
  display: block;
}
.cs-placeholder__label {
  font-family: 'Parkinsans', sans-serif;
  font-size: clamp(11px, 1.2vw, 14px);
  color: var(--text-dim);
  max-width: 360px;
  line-height: 1.55;
}

/* Single-video layout */
.cs-video-grid--single {
  grid-template-columns: 1fr;
  max-width: 840px;
}
