/* ============================================
   CASE STUDY — Shared styles
============================================ */

/* --- HERO --- */
.cs-hero {
  padding-top: calc(var(--nav-height) + var(--space-24));
  padding-bottom: var(--space-16);
  border-bottom: 1px solid var(--color-border);
}

.cs-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  letter-spacing: 0.04em;
}

.cs-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 820px;
  margin-bottom: var(--space-8);
  color: var(--color-text-primary);
}

.cs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tag {
  font-size: 11px;
  color: var(--color-text-muted);
  border: 0.5px solid var(--color-border);
  border-radius: 100px;
  padding: 5px 14px;
  letter-spacing: 0.04em;
}

/* --- COVER IMAGE --- */
.cs-cover {
  margin-bottom: 0;
}

.cs-cover-img {
  width: 100%;
  aspect-ratio: 16 / 7;
  background-color: var(--color-bg-secondary);
  overflow: hidden;
}

.cs-cover-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- OVERVIEW GRID --- */
.cs-section {
  padding: 60px 0;
  border-top: none;
}

.cs-section--alt {
  background-color: var(--color-bg-secondary);
}

.cs-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-16);
  align-items: start;
}

/* --- SIDEBAR --- */
.cs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-8));
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding-right: var(--space-8);
  border-right: 1px solid var(--color-border);
}

.cs-stat-label {
  font-size: 10px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.cs-stat-value {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--color-text-primary);
  font-weight: 500;
  line-height: 1.4;
}

/* --- BODY TEXT --- */
.cs-heading {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-6);
  color: var(--color-text-primary);
}

.cs-text {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.85;
  margin-bottom: var(--space-6);
  max-width: 640px;
}

.cs-label-sm {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  font-weight: 600;
}

/* --- TWO COLUMN --- */
.cs-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
  padding: var(--space-8);
  background: var(--color-bg-secondary);
  border-radius: 16px;
}

/* --- IMAGE PLACEHOLDER --- */
.cs-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 8;
  background-color: var(--color-bg-secondary);
  border: 1px dashed var(--color-border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-image-placeholder p {
  font-size: 12px;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- STATS GRID --- */
.cs-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: var(--space-10) 0;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
}

.cs-stat-item {
  padding: var(--space-8) var(--space-6);
  border-right: 1px solid var(--color-border);
  text-align: center;
}

.cs-stat-item:last-child {
  border-right: none;
}

.cs-stat-number {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  color: #285DC6;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-2);
}

.cs-stat-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* --- NEXT PROJECT --- */
.cs-next {
  padding: var(--space-24) 0;
  border-top: 1px solid var(--color-border);
}

.cs-next-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--color-border);
  transition: opacity 0.2s ease;
}

.cs-next-link:hover { opacity: 0.6; }

.cs-next-label {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.cs-next-arrow {
  font-size: 24px;
  color: var(--color-text-muted);
}

/* --- KEY LEARNINGS --- */
.cs-learnings {
  list-style: none;
  counter-reset: learning-counter;
  margin-top: var(--space-6);
}

.cs-learnings li {
  counter-increment: learning-counter;
  display: flex;
  gap: var(--space-6);
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.85;
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--color-border);
}

.cs-learnings li::before {
  content: counter(learning-counter, decimal-leading-zero);
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  min-width: 28px;
  padding-top: 4px;
  flex-shrink: 0;
}

/* --- IMAGE BLOCKS --- */
.cs-image-block {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: var(--space-8);
  background-color: var(--color-bg-secondary);
}

.cs-image-block img {
  width: 100%;
  height: auto;
  display: block;
}

.cs-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.cs-image-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.cs-image-grid .cs-image-block { margin-bottom: 0; }

/* --- SECTION NAV --- */
.cs-section-nav {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cs-section-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.cs-section-nav-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-text-muted);
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.cs-section-nav-label {
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.cs-section-nav-item.active .cs-section-nav-dot {
  background: var(--color-text-primary);
  transform: scale(1.6);
}

.cs-section-nav-item.active .cs-section-nav-label {
  color: var(--color-text-primary);
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .cs-hero { padding-top: calc(var(--nav-height) + var(--space-16)); }
  .cs-section { padding: var(--space-16) 0; }
  .cs-section-nav { display: none; }
}

@media (max-width: 768px) {
  .cs-title { font-size: clamp(24px, 6vw, 36px); }
  .cs-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .cs-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-6);
    padding-right: 0;
    border-right: none;
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--color-border);
  }
  .cs-hero { padding-top: calc(var(--nav-height) + var(--space-12)); }
  .cs-section { padding: var(--space-12) 0; }
  .cs-two-col { grid-template-columns: 1fr; gap: var(--space-6); }
  .cs-image-grid, .cs-image-grid--3 { grid-template-columns: 1fr; }
  .cs-stats-grid { grid-template-columns: 1fr; }
  .cs-stat-item { border-right: none; border-bottom: 1px solid var(--color-border); }
  .cs-stat-item:last-child { border-bottom: none; }
  .cs-next-label { font-size: 18px; }
}

@media (max-width: 480px) {
  .cs-hero { padding-top: calc(var(--nav-height) + var(--space-8)); }
  .cs-section { padding: var(--space-8) 0; }
  .cs-cover-img { aspect-ratio: 4 / 3; }
}

/* ============================================
   HERO IMAGE BLOCK — full bleed 16:9 with parallax
============================================ */

.cs-hero-img {
  position: relative;
  margin-top: var(--nav-height);
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--color-bg-secondary);
}

/* Oversized so parallax translateY has room at the top */
.cs-hero-img img {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 140%;
  object-fit: cover;
  object-position: center top;
  display: block;
  will-change: transform;
}

.cs-scroll-arrow {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.4s ease;
  outline: none;
  padding: 0;
}

/* ============================================
   ABOUT THE PROJECT section
============================================ */

.cs-about {
  position: relative;
  z-index: 2;
  margin-top: -24px;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  background: var(--color-bg-primary);
  padding: 64px 0;
}

.cs-about__eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.cs-about__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
  margin-bottom: 32px;
}

.cs-about__rule {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0 0 40px 0;
}

.cs-about__grid {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 64px;
  align-items: start;
}

.cs-about__body p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--color-text-secondary);
}

.cs-about__meta {
  display: flex;
  flex-direction: column;
}

.cs-about__meta-group {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.cs-about__meta-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.cs-about__meta-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.cs-about__meta-value {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

@media (max-width: 768px) {
  .cs-about { padding: var(--space-12) 0; border-radius: 16px 16px 0 0; }
  .cs-about__grid { grid-template-columns: 1fr; gap: var(--space-8); }
}

/* ============================================
   PAGE NAVIGATOR — sticky left side
============================================ */

.cs-page-nav {
  position: fixed;
  top: 50%;
  left: 32px;
  transform: translateY(-50%);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.cs-page-nav--visible {
  opacity: 1;
  pointer-events: auto;
}
.cs-page-nav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cs-page-nav__item {
  padding: 2px 0 2px 10px;
  border-left: 1.5px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.cs-page-nav__item.is-active {
  border-left-color: #285DC6;
}
.cs-page-nav__btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.cs-page-nav__label {
  font-family: var(--font-sans);
  font-size: 12px;
  color: #d0d0d0;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, font-weight 0.2s ease;
  white-space: nowrap;
  display: block;
}
.cs-page-nav__item.is-done .cs-page-nav__label {
  color: #aaa;
}
.cs-page-nav__item.is-active .cs-page-nav__label {
  color: var(--color-text-primary);
  font-weight: 600;
}
[data-theme="dark"] .cs-page-nav__item.is-done .cs-page-nav__label {
  color: #666;
}
.cs-page-nav__item:hover .cs-page-nav__label {
  color: #555;
}
@media (max-width: 1279px) {
  .cs-page-nav {
    display: none;
  }
}

/* --- MEDIA BREAK --- */
.cs-media-break {
  width: 100%;
  margin: 0;
  padding: var(--space-16) var(--space-24);
  box-sizing: border-box;
}

.cs-media-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: block;
  border-radius: 16px;
}

.cs-media-frame img,
.cs-media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cs-media-caption {
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
  font-style: italic;
  padding: 12px var(--space-6) 0;
  letter-spacing: 0.01em;
}

/* --- PROBLEM SECTION --- */
.cs-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.cs-section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.cs-section-rule {
  height: 1px;
  background: var(--color-border);
  margin-bottom: 24px;
}

.cs-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 32px;
  border: none;
  background: none;
  border-radius: 0;
  overflow: visible;
}

.cs-stat-col {
  padding: 0 32px 0 0;
  border-right: 1px solid var(--color-border);
  background: none;
  border-radius: 0;
}

.cs-stat-col:nth-child(2) {
  padding: 0 32px;
}

.cs-stat-col:last-child {
  padding: 0 0 0 32px;
  border-right: none;
}

.cs-big-num {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  color: #285DC6;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.cs-stat-name {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}

.cs-stat-detail {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.cs-problem-list {
  display: flex;
  flex-direction: column;
}

.cs-problem-row {
  display: flex;
  gap: 24px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
}

.cs-problem-row:last-child {
  border-bottom: none;
}

.cs-problem-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  min-width: 28px;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.cs-problem-head {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}

.cs-problem-body {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.75;
}

@media (max-width: 768px) {
  .cs-stats-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .cs-stat-col,
  .cs-stat-col:nth-child(2),
  .cs-stat-col:last-child {
    padding: 0 0 24px 0;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
  .cs-stat-col:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
}

/* --- SCREENS GRID --- */
.cs-screens-section {
  padding: var(--space-16) var(--space-24) var(--space-24);
  background: var(--color-bg-secondary);
  border-radius: 24px;
}

.cs-screens-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: end;
  max-width: 1080px;
  margin: 0 auto;
}

.cs-screen-item {
  width: 100%;
}

.cs-screen-frame {
  width: 100%;
  aspect-ratio: 360 / 800;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
}

.cs-screen-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.cs-screens-caption {
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 16px;
  letter-spacing: 0.01em;
}

@media (max-width: 768px) {
  .cs-screens-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* --- RESEARCH SECTION --- */
.cs-research-intro {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  max-width: 640px;
  margin-bottom: var(--space-10);
}

.cs-carousel-wrap {
  width: 100%;
  overflow: hidden;
  padding: 24px 0;
  border-top: none;
  border-bottom: none;
  margin-bottom: var(--space-10);
  cursor: grab;
  box-sizing: border-box;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.cs-carousel-wrap:hover .cs-carousel-track {
  animation-play-state: paused;
}

.cs-carousel-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: cs-scroll 80s linear infinite;
}

@keyframes cs-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.cs-carousel-img {
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  height: 260px;
}

.cs-carousel-img img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  display: block;
}

.cs-carousel-portrait  { width: 195px; }
.cs-carousel-landscape { width: 400px; }
.cs-carousel-square    { width: 260px; }

.cs-research-findings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 32px;
  border-top: none;
  margin-top: var(--space-6);
}

.cs-research-finding {
  padding: var(--space-10) 0 var(--space-6) 0;
  border-left: 1px solid var(--color-border);
  padding-left: 24px;
  min-width: 0;
}

.cs-research-finding:first-child {
  border-left: none;
  padding-left: 0;
}

.cs-finding-num {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  color: #285DC6;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}

.cs-finding-head {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}

.cs-finding-body {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* --- HMW SECTION --- */
.cs-hmw-section {
  padding: var(--space-24) 0;
}

.cs-hmw-section .cs-eyebrow {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: #E85D3A;
  text-align: center;
  margin-bottom: var(--space-6);
}

.cs-hmw-ticker-wrap {
  overflow: hidden;
  padding: 20px 0;
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 6%,
    black 94%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 6%,
    black 94%,
    transparent 100%
  );
  will-change: transform;
}

.cs-hmw-ticker-wrap:hover .cs-hmw-ticker-track {
  animation-play-state: paused;
}

.cs-hmw-ticker-track {
  display: flex;
  width: max-content;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

@keyframes hmw-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.cs-hmw-ticker-item {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  color: var(--color-text-primary);
  white-space: nowrap;
  letter-spacing: -0.03em;
  padding-right: 64px;
}

.cs-hmw-diamond {
  color: #285DC6;
  margin-left: 8px;
}

.cs-hmw-sub {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  max-width: 560px;
}

@media (max-width: 768px) {
  .cs-carousel-img { height: 180px; }
  .cs-carousel-portrait  { width: 130px; }
  .cs-carousel-landscape { width: 260px; }
  .cs-carousel-square    { width: 180px; }
  .cs-research-findings { grid-template-columns: 1fr 1fr; gap: 0; }
  .cs-research-finding { border-bottom: 1px solid var(--color-border); }
  .cs-research-finding:nth-child(2n) { border-right: none; padding-right: 0; }
  .cs-research-finding:nth-child(n+3) { border-bottom: none; }
}

/* --- USER TESTING SECTION --- */
.cs-ut-stats {
  font-size: 13px;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-8);
}

.cs-ut-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.cs-ut-tab {
  font-size: 11px;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.04em;
}

.cs-ut-tab:hover {
  border-color: #285DC6;
  color: #285DC6;
}

.cs-ut-tab.active {
  background: #285DC6;
  border-color: #285DC6;
  color: #fff;
}

.cs-ut-tab--final {
  border-color: #16a34a;
  color: #16a34a;
}

.cs-ut-tab--final.active {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.cs-ut-panel {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: start;
  padding-bottom: var(--space-16);
}

#testing {
  padding-bottom: var(--space-24);
}

.cs-ut-screen {
  width: 300px;
  flex-shrink: 0;
  height: 520px;
  overflow: hidden;
}

.cs-ut-screen .marvel-device {
  transform: scale(0.48);
  transform-origin: top center;
  margin-left: -80px;
}

.cs-ut-screen .cs-screen-frame {
  aspect-ratio: 9 / 19.5;
  border-radius: 20px;
  overflow: hidden;
  background: var(--color-bg-secondary);
  width: 100%;
  transition: opacity 0.3s ease;
}

.cs-ut-screen .cs-screen-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cs-ut-detail {
  padding-top: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cs-ut-round {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.cs-ut-detail-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0;
}

.cs-ut-detail-body {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  max-width: 480px;
}

.cs-ut-fix {
  font-size: 14px;
  font-weight: 600;
  color: #285DC6;
}

.cs-ut-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.cs-ut-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: transparent;
  font-size: 16px;
  color: var(--color-text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cs-ut-arrow:hover {
  border-color: #285DC6;
  color: #285DC6;
}

.cs-ut-nav-counter {
  font-size: 12px;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.cs-ut-fix--final {
  color: #16a34a;
}

@media (max-width: 768px) {
  .cs-ut-panel {
    grid-template-columns: 1fr;
  }
  .cs-ut-screen .cs-screen-frame {
    max-width: 240px;
    margin: 0 auto;
  }
}

/* --- IMPACT SECTION --- */
.cs-impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.cs-impact-big {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.cs-impact-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.cs-impact-stat-cell {
  padding: var(--space-6) var(--space-6);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.cs-impact-stat-cell:nth-child(2) {
  border-right: none;
  padding-right: 0;
}

.cs-impact-stat-cell:nth-child(3) {
  border-bottom: none;
}

.cs-impact-stat-cell--last {
  border-right: none;
  border-bottom: none;
  padding-right: 0;
}

.cs-impact-was {
  font-size: 11px;
  color: var(--color-text-muted);
  text-decoration: line-through;
  margin-bottom: 4px;
  font-family: monospace;
  min-height: 16px;
}

.cs-impact-num {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  color: #285DC6;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
  transition: all 0.1s ease;
}

.cs-impact-num--static {
  font-size: clamp(24px, 3vw, 36px);
}

.cs-impact-name {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
}

@media (max-width: 768px) {
  .cs-impact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
}

/* --- FINAL DESIGN — scrolling screens + lightbox --- */
.rs-row-wrap {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.rs-row {
  display: flex;
  gap: 12px;
  width: max-content;
  padding: 4px 0;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

.rs-screen {
  width: 160px;
  min-width: 160px;
  aspect-ratio: 9/16;
  border-radius: 14px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
  transition: transform 0.25s ease, border-color 0.25s ease;
  background: rgba(255,255,255,0.1);
}

.rs-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rs-screen:hover {
  transform: scale(1.04);
  border-color: rgba(255,255,255,0.5);
}

.rs-lbl {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.55);
  padding: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.rs-lbl p {
  font-size: 9px;
  color: #fff;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rs-screen:hover .rs-lbl {
  opacity: 1;
}

.rs-lb {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.rs-lb.open {
  display: flex;
}

.rs-lb-screen {
  width: 260px;
  aspect-ratio: 9/16;
  border-radius: 20px;
  overflow: hidden;
  background: #1a1a18;
  border: 1px solid #2a2a28;
}

.rs-lb-label {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rs-lb-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.rs-lb-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.rs-lb-btn:hover {
  background: rgba(255,255,255,0.18);
}

.rs-lb-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.rs-lb-close:hover {
  background: rgba(255,255,255,0.18);
}

.rs-lb-counter {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  min-width: 40px;
  text-align: center;
}

/* --- MASONRY GRID --- */
.cs-masonry {
  columns: 3;
  column-gap: 20px;
}

.cs-masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  display: block;
  transition: transform 0.3s ease;
}

.cs-masonry-item:hover {
  transform: scale(1.02);
}

.cs-masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
}

.cs-masonry-item .rs-lbl {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.55);
  padding: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 0 0 20px 20px;
}

.cs-masonry-item:hover .rs-lbl {
  opacity: 1;
}

.cs-masonry-item .rs-lbl p {
  font-size: 9px;
  color: #fff;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 768px) {
  .cs-masonry {
    columns: 2;
    column-gap: 12px;
  }
}

/* --- MASONRY MOTION COLUMNS --- */
.cs-masonry-motion {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  height: 600px;
  overflow: hidden;
  padding: 0 var(--space-24);
  max-width: 900px;
  margin: 0 auto;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
}

.cs-mm-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.cs-mm-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.cs-mm-item:hover {
  transform: scale(1.02);
}

.cs-mm-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
}

.cs-mm-overlay {
  display: none;
}

.cs-mm-item .rs-lbl {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  padding: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 0 0 20px 20px;
}

.cs-mm-item:hover .rs-lbl {
  opacity: 1;
}

.cs-mm-item .rs-lbl p {
  font-size: 9px;
  color: #fff;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 768px) {
  .cs-masonry-motion {
    grid-template-columns: repeat(2, 1fr);
    height: 500px;
  }
}

/* --- DESIGN FRAME + MOTION OVERRIDE --- */
.cs-design-frame {
  width: calc(100% - var(--space-24) * 2);
  margin: 0 auto;
  aspect-ratio: 19/24;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.cs-design-frame .cs-masonry-motion {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  height: 100%;
  width: 100%;
  overflow: hidden;
  padding: 48px;
  box-sizing: border-box;
  max-width: none;
  margin: 0;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 12%,
    black 88%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 12%,
    black 88%,
    transparent 100%
  );
}

/* --- LEARNINGS SECTION --- */
.cs-learnings-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--space-16);
  align-items: start;
}

.cs-learnings-left {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-8));
}

.cs-learnings-right {
  display: flex;
  flex-direction: column;
}

.cs-learning-row {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--color-border);
  align-items: start;
}

.cs-learning-row--last {
  border-bottom: none;
}

.cs-learning-num {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-muted);
  min-width: 28px;
  padding-top: 3px;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.cs-learning-head {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.cs-learning-body {
  font-size: 16px;
  color: var(--color-text-secondary);
  font-weight: 200;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .cs-learnings-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .cs-learnings-left {
    position: static;
  }
}

/* --- CTA SECTION --- */
.cs-cta-section {
  padding: var(--space-16) 0;
}

.cs-cta-wrap {
  background: #111110;
  border-radius: 20px;
  padding: 64px;
}

.cs-cta-heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 700;
  color: #FAFAF8;
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin-bottom: 48px;
  white-space: nowrap;
}

.cs-cta-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
}

.cs-cta-question {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  color: #FAFAF8;
  line-height: 1.3;
}

.cs-cta-text {
  font-size: 15px;
  color: #555;
  line-height: 1.8;
}

.cs-cta-link {
  color: #FAFAF8;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.cs-cta-link:hover {
  color: #285DC6;
}

@media (max-width: 768px) {
  .cs-cta-wrap {
    padding: 36px 24px;
  }
  .cs-cta-heading {
    white-space: normal;
    font-size: clamp(32px, 8vw, 48px);
  }
  .cs-cta-body {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* --- NEXT PROJECT — cursor thumbnail --- */
.cs-next-label-sm {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.cs-next-cursor-thumb {
  position: fixed;
  width: 200px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transform: rotate(-4deg);
  transition: opacity 0.25s ease;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
  top: 0;
  left: 0;
}

.cs-next-cursor-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- PURE CSS iPHONE MOCKUP --- */
.cs-iphone {
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
}

.cs-iphone-body {
  background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
  border-radius: 44px;
  padding: 12px;
  box-shadow:
    0 0 0 1px #3a3a3a,
    0 0 0 2px #111,
    0 32px 64px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.08);
  position: relative;
}

.cs-iphone-side-btn {
  position: absolute;
  background: #222;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.cs-iphone-vol-up {
  left: -3px;
  top: 80px;
  width: 3px;
  height: 32px;
}

.cs-iphone-vol-down {
  left: -3px;
  top: 124px;
  width: 3px;
  height: 32px;
}

.cs-iphone-power {
  right: -3px;
  top: 100px;
  width: 3px;
  height: 48px;
}

.cs-iphone-inner {
  background: #000;
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cs-iphone-notch {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0 6px;
  background: #000;
  flex-shrink: 0;
}

.cs-iphone-island {
  width: 80px;
  height: 22px;
  background: #111;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px #222;
}

.cs-iphone-screen {
  width: 100%;
  aspect-ratio: 390 / 760;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.cs-iphone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

.cs-iphone-chin {
  background: #000;
  padding: 8px 0 10px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.cs-iphone-indicator {
  width: 100px;
  height: 4px;
  background: #333;
  border-radius: 2px;
}

.cs-nda-screen { background: var(--color-bg); padding: var(--space-24) 0; }
.cs-nda-inner { max-width: 900px; margin: 0 auto; padding: 0 var(--space-24); }
.cs-nda-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #854F0B; background: #FAEEDA; border: 0.5px solid #EF9F27; padding: 4px 12px; border-radius: 20px; margin-bottom: 40px; }
[data-theme="dark"] .cs-nda-badge { color: #FAC775; background: rgba(239,159,39,0.15); border-color: rgba(239,159,39,0.3); }
.cs-nda-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-text-muted); margin-bottom: 16px; font-weight: 600; }
.cs-nda-title { font-family: var(--font-display); font-size: clamp(28px, 4vw, 48px); font-weight: 800; color: var(--color-text-primary); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 20px; max-width: 680px; }
.cs-nda-body { font-size: 15px; color: var(--color-text-secondary); line-height: 1.75; max-width: 600px; }
.cs-nda-rule { border: none; border-top: 0.5px solid var(--color-border); margin: 48px 0; }
.cs-nda-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.cs-nda-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-text-muted); margin-bottom: 16px; font-weight: 600; }
.cs-nda-section-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--color-text-primary); margin-bottom: 12px; line-height: 1.3; }
.cs-nda-section-body { font-size: 14px; color: var(--color-text-secondary); line-height: 1.7; }
.cs-nda-role-grid { display: flex; flex-direction: column; gap: 16px; }
.cs-nda-meta-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-muted); margin-bottom: 3px; font-weight: 600; }
.cs-nda-meta-value { font-size: 14px; color: var(--color-text-primary); font-weight: 500; }
.cs-nda-metrics { margin-bottom: 64px; }
.cs-nda-metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.cs-nda-metric-card { background: var(--color-bg-secondary); border-radius: 12px; padding: 24px; }
.cs-nda-metric-num { font-family: var(--font-display); font-size: 48px; font-weight: 800; color: var(--color-text-primary); line-height: 1; margin-bottom: 8px; letter-spacing: -0.02em; }
.cs-nda-metric-label { font-size: 12px; color: var(--color-text-muted); line-height: 1.5; }
.cs-nda-cta { background: #111110; border-radius: 16px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cs-nda-cta-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.4); margin-bottom: 10px; font-weight: 600; }
.cs-nda-cta-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: #fff; line-height: 1.2; }
.cs-nda-cta-sub { font-size: 14px; color: rgba(255,255,255,0.5); margin-top: 8px; }
.cs-nda-cta-btn { background: #285DC6; color: #fff; border: none; padding: 14px 28px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; flex-shrink: 0; text-decoration: none; display: inline-block; }
.cs-nda-cta-btn:hover { background: #1e4fa8; }

