/* =============================================
   TOKENS
   ============================================= */
:root {
  --blue:   #2b40f5;
  --lime:   #e6fab9;
  --bg:     #e4e5f2;
  --muted:  #5a5b78;
  --pink:   #ffccd4;
  --peach:  #f3c789;
  --white:  #ffffff;
  --black:  #000000;

  --font-sans:  'Inter', sans-serif;
  --font-serif: 'Libre Baskerville', serif;
  --font-mono:  'DM Mono', monospace;

  --pad:         64px;
  --gap:         16px;
  --radius-card: 4px;
  --radius-img:  16px 16px 0 0;
}

/* =============================================
   RESET
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* =============================================
   LAYOUT HELPERS
   ============================================= */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-top: 120px;
  padding-bottom: 0;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: url('img/hero-bg.jpg') center center / cover no-repeat;
  will-change: transform;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* Headline */
.hero__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  will-change: transform;
}
.hero__headline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hero__headline-bold {
  display: block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(32px, 3.75vw, 48px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--blue);
}
.hero__headline-italic {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(32px, 3.75vw, 48px);
  line-height: 1.1;
  color: var(--blue);
}
.hero__badge {
  display: inline-flex;
  padding: 8px 12px;
  background: var(--lime);
  align-self: flex-start;
}
.hero__badge span {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--blue);
  text-transform: uppercase;
  line-height: 1.1;
}

/* Device mockup */
.device {
  width: 100%;
  max-width: 922px;
  align-self: center;
  will-change: transform;
}
.device__frame {
  background: var(--blue);
  border: 8px solid var(--white);
  border-bottom: none;
  border-radius: 32px 32px 0 0;
  padding: 32px 48px 32px;
  box-shadow: 0 0 4.4px rgba(0,0,0,.06), 0 5px 19px rgba(0,0,0,.08);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.device__play {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--lime);
  letter-spacing: 0;
}
.device__screen {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.device__ido {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  /* height = one role line so its bottom edge aligns with where faded roles start */
  height: calc(clamp(20px, 2.5vw, 32px) * 1.35);
}
.device__cursor {
  width: 9px;
  height: 100%;
  max-height: 36px;
  background: var(--lime);
  flex-shrink: 0;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.device__prefix {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(20px, 2.5vw, 32px);
  color: var(--lime);
  line-height: 1.35;
  flex-shrink: 0;
}
/* Vertical carousel */
.device__carousel-wrap {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  -webkit-mask-image: linear-gradient(to bottom, black 25%, rgba(0,0,0,.5) 60%, transparent 100%);
  mask-image:         linear-gradient(to bottom, black 25%, rgba(0,0,0,.5) 60%, transparent 100%);
}
.device__carousel {
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.device__role {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(20px, 2.5vw, 32px);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
}

.device__divider {
  height: 1px;
  background: rgba(230,250,185,.5);
}
.device__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.device__stat-value {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(22px, 2.5vw, 32px);
  color: var(--lime);
  line-height: 1;
  margin-bottom: 4px;
}
.device__stat-label {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 11px;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

/* =============================================
   LOGOS
   ============================================= */
.logos {
  padding-block: 28px;
}
/* Centered container matching the hero device width */
.logos__inner {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 922px;
  margin-inline: auto;
}
.logos__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: logos-scroll 26s linear infinite;
  will-change: transform;
}
@keyframes logos-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.3333%); }
}
@media (prefers-reduced-motion: reduce) {
  .logos__track { animation: none; }
}
.logos__item {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-inline: 0;
  height: 40px;
}
.logos__item img {
  height: 40px;
  width: auto;
  object-fit: contain;
}
.logos__fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  pointer-events: none;
  z-index: 1;
}
.logos__fade--left  { left: 0;  background: linear-gradient(to right, var(--bg) 20%, transparent); }
.logos__fade--right { right: 0; background: linear-gradient(to left,  var(--bg) 20%, transparent); }

/* =============================================
   PATTERN
   ============================================= */
.pattern {
  width: calc(100% - 2px);
  margin-inline: 1px;
  height: 220px;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: url('img/bg-pattern.jpg') repeat-x center center / auto 100%;
}

.pattern--bottom {
  width: 100%;
  height: 220px;
  margin-top: -140px;
  background: url('img/bg-pattern.jpg') repeat-x center center / auto 100%;
}

/* =============================================
   ABOUT
   ============================================= */
.content-panel {
  background: var(--white);
  box-shadow: 0 -24px 54px 10px rgba(20, 20, 20, 0.6), 0 24px 54px 10px rgba(20, 20, 20, 0.6);
  position: relative;
  z-index: 1;
  margin-top: -40px;
  will-change: transform;
}
.about {
  padding-block: 80px;
}
.about__header {
  margin-bottom: 40px;
}
.about__title {
  font-family: var(--font-sans);
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.about__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}
.about__body {
  display: grid;
  grid-template-columns: 1fr 40%;
  gap: 0;
}
.about__image {
  overflow: hidden;
  min-height: 480px;
}
.about__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.about__card {
  background: #292929;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: flex-end;
}
.about__text {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  color: var(--white);
  line-height: 1.5;
}
.about__mark {
  background: #2B40F5;
  color: #ffffff;
  padding: 0 2px;
  border-radius: 2px;
}
@media (max-width: 768px) {
  .about { padding-block: 56px; }
  .about__body { grid-template-columns: 1fr; }
  .about__image { height: 300px; }
}

/* =============================================
   WORK
   ============================================= */
.work {
  margin-top: 0;
  margin-bottom: 0;
  position: relative;
  /* pattern shows in the gap revealed as the white card rises */
  background: url('img/bg-pattern.jpg') repeat-x center bottom / auto 220px;
}

/* Full-width white card — content constrained by inner .container */
.work-inner {
  background: var(--white);
  padding-block: 62px 72px;
  position: relative;
  z-index: 1;
}
.work-inner .container {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Section header */
.work-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.work-eyebrow {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--blue);
  text-transform: uppercase;
  line-height: 1.1;
}
.work-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(32px, 3.75vw, 48px);
  color: var(--blue);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.work-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

/* 2 × 2 project grid */
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 24px;
}

/* Project card */
.project-card {
  background: #f6f6f6;
  border-radius: var(--radius-card);
  padding: 40px 40px 37px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(43, 64, 245, 0.12);
}
.project-card:hover .project-card__cover img {
  transform: scale(1.03);
}
.project-card__cover img {
  transition: transform 0.4s ease;
}
.project-card__company {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--blue);
  line-height: 1.1;
}
.project-card__cover {
  width: 100%;
  aspect-ratio: 515 / 346;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bg);
}
.project-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  display: block;
}
.project-card__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.project-card__title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
  color: var(--black);
  line-height: 1.1;
}
.project-card__role {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 11px;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

/* =============================================
   CONTACT
   ============================================= */
.contact {
  margin-top: 0;
  margin-bottom: var(--gap);
}
/* Full-width blue band — content constrained by inner .container */
.contact__inner {
  background: var(--blue);
  padding-block: 80px;
}
.contact__inner .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.contact__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(24px, 2.5vw, 32px);
  color: var(--pink);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.contact__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--pink);
}
.contact__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  background: transparent;
  border: 2px solid var(--pink);
  border-radius: 88px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  color: var(--pink);
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.contact__cta:hover,
.contact__cta:focus-visible {
  opacity: 0.7;
  outline: none;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 32px;
  margin-bottom: 16px;
}
.footer__copy {
  font-size: 14px;
  color: var(--muted);
}
.footer__nav {
  display: flex;
  gap: 20px;
  list-style: none;
  align-items: center;
}
.footer__icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color 0.2s ease;
}
.footer__icon-link:hover { color: var(--blue); }

/* =============================================
   RESPONSIVE — TABLET
   ============================================= */
@media (max-width: 1024px) {
  :root { --pad: 32px; }

  .hero { min-height: auto; padding-top: 80px; }

  .device__frame { padding: 24px 32px; }

  .work-inner { padding-block: 48px 56px; }
  .work-inner .container { gap: 36px; }
  .work-title { font-size: clamp(28px, 3vw, 40px); }

  .contact__inner { padding-block: 60px; }
}

/* =============================================
   RESPONSIVE — iPad PORTRAIT & SMALLER
   ============================================= */
@media (max-width: 768px) {
  .work-grid { grid-template-columns: 1fr; }
}

/* =============================================
   RESPONSIVE — MOBILE
   ============================================= */
@media (max-width: 640px) {
  :root { --pad: 20px; }

  .hero { padding-top: 56px; }

  .device__screen { flex-direction: column; gap: 8px; min-height: unset; }
  .device__cursor { height: 28px; }
  .device__frame { padding: 20px 24px; gap: 20px; }

  /* Hide "People per team led" and "In-house companies" stats on mobile */
  .device__stat:nth-child(2),
  .device__stat:nth-child(3) { display: none; }
  .device__stats { grid-template-columns: 1fr 1fr; }

  .logos { padding-block: 20px; }
  .logos__item img { height: 32px; }

  .pattern { height: 140px; }

  .work-inner { padding-block: 32px 40px; }
  .work-inner .container { gap: 28px; }
  .project-card { padding: 28px 24px; }
  .project-card__title { font-size: 20px; }

  .contact__inner { padding-block: 48px; }

  .footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .footer__nav { justify-content: center; }
}

/* =============================================
   MODAL
   ============================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(43, 64, 245, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal__box {
  position: relative;
  background: var(--white);
  border-radius: 12px;
  padding: 48px;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
  animation: modal-in 0.25s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
  transition: background 0.15s;
}
.modal__close:hover { background: var(--bg); }

.modal__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 28px;
  color: var(--blue);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.modal__subtitle {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: -8px;
}
.modal__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.modal__field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.modal__field input,
.modal__field textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--black);
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: 6px;
  padding: 10px 14px;
  width: 100%;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}
.modal__field input:focus,
.modal__field textarea:focus {
  border-color: var(--blue);
  background: var(--white);
}
.modal__submit {
  margin-top: 4px;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  border: none;
  border-radius: 88px;
  padding: 13px 24px;
  cursor: pointer;
  align-self: flex-start;
  transition: opacity 0.2s;
  letter-spacing: -0.01em;
}
.modal__submit:hover { opacity: 0.85; }

.modal__alt {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.modal__alt a {
  color: var(--blue);
  font-weight: 500;
}
.modal__alt a:hover { text-decoration: underline; }

/* success state */
.modal__box.is-sent .modal__form,
.modal__box.is-sent .modal__subtitle { display: none; }
.modal__success {
  display: none;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
  padding: 16px 0;
}
.modal__box.is-sent .modal__success { display: block; }

@media (max-width: 640px) {
  .modal__box { padding: 32px 24px; }
  .modal__title { font-size: 22px; }
}

/* =============================================
   CASE STUDY MODAL
   ============================================= */
.cs-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  /* outer shell — no scroll, no bg, just positions children */
}
.cs-modal[hidden] { display: none; }

/* Dark blurred backdrop */
.cs-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 18, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Floating window — gap only at the top, flush on left / right / bottom */
.cs-modal__window {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1;
}

/* Close button — inline flex item inside the subnav row */
.cs-modal__close-fab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--blue);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  transition: opacity 0.15s;
}
.cs-modal__close-fab:hover { opacity: 0.75; }

/* Enter — fade in */
.cs-modal.is-entering .cs-modal__window,
.cs-modal.is-entering .cs-modal__backdrop {
  animation: cs-modal-enter 0.28s ease both;
}
@keyframes cs-modal-enter {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Leave — fade out */
.cs-modal.is-leaving {
  pointer-events: none;
}
.cs-modal.is-leaving .cs-modal__window,
.cs-modal.is-leaving .cs-modal__backdrop {
  animation: cs-modal-leave 0.22s ease both;
}
@keyframes cs-modal-leave {
  from { opacity: 1; }
  to   { opacity: 0; }
}
.cs-modal__body {
  /* inner content uses its own container classes */
}

/* Permanent sticky header inside the modal window */
.cs-subnav {
  position: sticky;
  top: 0;
  z-index: 9;
  background: var(--bg);
  border-bottom: 1px solid rgba(43, 64, 245, 0.08);
}
.cs-subnav__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 32px;
}
.cs-subnav__title {
  flex: 1;          /* fills remaining space so next + close stay right-aligned */
  min-width: 0;     /* allows long titles to truncate instead of pushing siblings */
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  color: var(--black);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-subnav__next-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: right;
  transition: opacity 0.2s;
}
.cs-subnav__next-btn:hover { opacity: 0.6; }
.cs-subnav__next-label {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cs-subnav__next-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  color: var(--black);
}

/* =============================================
   CASE STUDY PAGE
   ============================================= */

/* Fixed top nav bar */
.cs-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(228, 229, 242, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(43, 64, 245, 0.08);
}
.cs-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
}
.cs-nav__brand {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  color: var(--blue);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.cs-nav__brand:hover { opacity: 0.75; }
.cs-nav__close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 16px;
  border: 1.5px solid rgba(90, 91, 120, 0.3);
  border-radius: 88px;
  transition: color 0.15s, border-color 0.15s;
}
.cs-nav__close:hover {
  color: var(--blue);
  border-color: var(--blue);
}
.cs-nav__close svg {
  flex-shrink: 0;
}

/* Page body offset for fixed nav */
.cs-page {
  padding-top: 72px;
}

/* Hero */
.cs-hero {
  padding-top: 72px;
  padding-bottom: 64px;
}
.cs-hero__meta {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}
.cs-hero__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 56px);
  color: var(--black);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 24px;
}
.cs-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.cs-tag {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: #0E0F28;
  border: 2px solid #0E0F28;
  border-radius: 4px;
  padding: 6px 12px;
  line-height: 1.4;
}
.cs-hero__summary {
  font-family: var(--font-sans);
  font-size: clamp(16px, 1.5vw, 20px);
  color: var(--black);
  line-height: 1.5;
  max-width: 780px;
  margin-bottom: 48px;
}
.cs-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  gap: 0 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.cs-hero__stat-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 4px;
}
.cs-hero__stat-value {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 20px;
  color: var(--black);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Cover image */
.cs-cover {
  width: 100%;
  aspect-ratio: 1400 / 760;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--bg);
}
.cs-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  display: block;
}

/* Content sections */
.cs-content {
  padding-top: 80px;
  padding-bottom: 120px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}
.cs-section {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
}
.cs-section__label {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  /* sticky within modal scroll container — 24px below the permanent subnav */
  position: sticky;
  top: 125px; /* subnav ~101px + 24px gap */
  align-self: start;
  background: transparent;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 24px;
  /* reset button styles */
  border: none;
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
  transition: opacity 0.15s;
}
.cs-section__label:hover { opacity: 0.7; }
/* (subnav is now always visible — single top value above is sufficient) */
.cs-section__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.cs-section__heading {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(22px, 2.5vw, 30px);
  color: var(--black);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.cs-section__heading em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}
.cs-section__text {
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
}

/* Horizontal cards (filter type list) */
.cs-cards-h {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}
.cs-card-h {
  background: var(--white);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.cs-card-h__heading {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: #0e0f28;
  flex-shrink: 0;
  min-width: 180px;
}
.cs-card-h__text {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}
@media (max-width: 640px) {
  .cs-card-h { flex-direction: column; align-items: flex-start; gap: 6px; }
  .cs-card-h__heading { min-width: unset; }
}

/* Outcome two-column table */
.cs-outcome-table {
  width: 100%;
  border-collapse: collapse;
}
.cs-outcome-table tr {
  border-bottom: 1px solid rgba(14, 15, 40, .08);
}
.cs-outcome-table tr:last-child {
  border-bottom: none;
}
.cs-outcome-table td {
  padding: 14px 0;
  vertical-align: middle;
}
.cs-outcome-table__label {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--muted);
  padding-right: 32px;
  width: 100%;
}
.cs-outcome-table__value {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: #0e0f28;
  text-align: left;
  white-space: nowrap;
}

/* Metrics row */
.cs-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 8px;
}
.cs-metric {
  background: var(--white);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cs-metric__value {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  color: var(--blue);
  letter-spacing: -0.03em;
  line-height: 1;
}
.cs-metric__label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1.4;
}

/* Placeholder image block */
.cs-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--white);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-placeholder span {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  opacity: 0.5;
}

/* Divider */
.cs-divider {
  height: 1px;
  background: rgba(43, 64, 245, 0.1);
}

/* Footer CTA on case study */
.cs-footer-cta {
  background: var(--blue);
  padding-block: 80px;
}
.cs-footer-cta .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.cs-footer-cta__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(24px, 2.5vw, 32px);
  color: var(--pink);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.cs-footer-cta__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

/* Rich text block (bold heading + body) */
.cs-richtext {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cs-richtext__heading {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 17px;
  color: var(--black);
  line-height: 1.4;
}
.cs-richtext__text {
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
}

/* Inline image with caption */
.cs-image {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cs-image__frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: #e0e0e0;
}
.cs-image__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  display: block;
}
.cs-image__caption {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* Team grid */
.cs-team {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 40px;
  margin-top: 8px;
}
.cs-team__member {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cs-team__name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 17px;
  color: var(--black);
  line-height: 1.3;
}
.cs-team__role {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

/* Lenses grid (Unified AI Workspace) */
.cs-lenses {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 8px;
}
.cs-lens {
  background: var(--white);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cs-lens__heading {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 17px;
  color: var(--black);
  line-height: 1.2;
}
.cs-lens__text {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
@media (max-width: 768px) {
  .cs-lenses { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .cs-lenses { grid-template-columns: 1fr; }
}

/* ── Team Timeline ─────────────────────────────────────────── */
.cs-timeline {
  padding-top: 4px;
}
.cs-timeline__track {
  position: relative;
  display: flex;
  flex-direction: column;
}
/* Dashed vertical left line */
.cs-timeline__track::before {
  content: '';
  position: absolute;
  left: 4px;            /* center of the 10px dot */
  top: 0;
  bottom: 0;
  border-left: 2px dashed #5A5B78;
  z-index: 0;
}
.cs-timeline__entry {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
}
/* Circle node on the line */
.cs-timeline__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid #5A5B78;
  flex-shrink: 0;
  margin-top: 7px;
  position: relative;
  z-index: 2;
}
/* Avatar + card row */
.cs-timeline__entry-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
}
/* Avatar group */
.cs-timeline__avatars {
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
}
.cs-timeline__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 4px solid var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: #0e0f28;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.cs-timeline__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Arsen overlay in grouped avatar pairs */
.cs-timeline__avatar--arsen {
  margin-left: -20px;
  z-index: 2;
}
/* Avatar wrap — holds the avatar circle + badge icon */
.cs-timeline__avatar-wrap {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
}
.cs-timeline__avatar-badge {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: auto;
  pointer-events: none;
}
.cs-timeline__card {
  background: var(--white);
  border-radius: 1px;
  padding: 14px 16px;
  flex: 1;
  max-width: 420px;
}
.cs-timeline__entry-text {
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 8px;
}
.cs-timeline__entry-name {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: rgba(14, 15, 40, .42);
  line-height: 1.3;
}

/* Mobile timeline */
@media (max-width: 640px) {
  .cs-timeline__entry {
    gap: 12px;
    padding: 12px 0;
  }
  .cs-timeline__entry-content {
    flex-wrap: wrap;
    gap: 12px;
  }
  .cs-timeline__avatar {
    width: 48px;
    height: 48px;
  }
  .cs-timeline__card {
    flex: 1 1 100%;
    min-width: 0;
  }
}

/* Bottom project navigation */
.cs-nav-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 40px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 0;
}
.cs-nav-bottom__back {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--black);
  text-decoration: none;
  transition: opacity 0.2s;
}
.cs-nav-bottom__back:hover { opacity: 0.5; }
.cs-nav-bottom__next {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-decoration: none;
}
.cs-nav-bottom__next-label {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
}
.cs-nav-bottom__next-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--black);
  transition: opacity 0.2s;
}
.cs-nav-bottom__next:hover .cs-nav-bottom__next-title { opacity: 0.5; }

/* Responsive */
@media (max-width: 1024px) {
  .cs-section { grid-template-columns: 180px 1fr; gap: 32px; }
  .cs-content { padding-top: 60px; padding-bottom: 80px; gap: 60px; }
  .cs-hero__stats { gap: 0 32px; }
}
@media (max-width: 640px) {
  .cs-hero { padding-top: 48px; padding-bottom: 40px; }
  .cs-hero__stats { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .cs-section { grid-template-columns: 1fr; gap: 16px; }
  .cs-content { padding-top: 48px; padding-bottom: 64px; gap: 48px; }
  .cs-metrics { grid-template-columns: 1fr 1fr; }
  .cs-metric { padding: 24px 20px; }
  .cs-team { grid-template-columns: 1fr; }
  .cs-nav-bottom { flex-direction: column; align-items: flex-start; gap: 24px; }
  .cs-nav-bottom__next { align-items: flex-start; }

  /* Hide "Next project" from the sticky subnav on mobile */
  #cs-subnav-next { display: none; }

  /* Remove sticky behaviour and left indent from section labels on mobile */
  .cs-section__label {
    position: static;
    padding-left: 0;
  }

  /* Keep subnav header items vertically centred on mobile */
  .cs-subnav__inner {
    align-items: center;
    padding-block: 20px;
  }
}
