/* ============ TWIST WEBSITE — page styles ============ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--twist-navy-950);
  color: var(--fg);
  font-family: var(--font-body);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* page wraps */
.page {
  min-height: 100vh;
  background: var(--twist-navy-950);
  color: var(--fg);
  position: relative;
  /* mode-driven tokens (overridden in [data-mode]) */
  --mode-display-scale: 1;
  --mode-display-weight: 800;
  --mode-display-tracking: -0.035em;
  --mode-section-pad: 140px;
  --mode-hero-bloom: 1;
  --mode-gradient-headline: 1; /* 1=gradient, 0=plain */
  --mode-grid-lines: 1;
}
.page[data-mode="quiet"] {
  --mode-display-scale: 0.78;
  --mode-display-weight: 700;
  --mode-display-tracking: -0.025em;
  --mode-section-pad: 120px;
  --mode-hero-bloom: 0;
  --mode-gradient-headline: 0;
  --mode-grid-lines: 0;
}
.page[data-mode="hybrid"] {
  --mode-display-scale: 0.92;
  --mode-display-weight: 800;
  --mode-display-tracking: -0.03em;
  --mode-section-pad: 130px;
  --mode-hero-bloom: 0.6;
  --mode-gradient-headline: 1;
  --mode-grid-lines: 0;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
}
.container-narrow {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== NAV ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,19,42,0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms cubic-bezier(.2,.8,.2,1), background 200ms;
}
.nav.scrolled {
  border-bottom-color: rgba(247,241,230,0.08);
  background: rgba(11,19,42,0.88);
}
.nav-row {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.nav-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--twist-accent-gradient);
  display: grid; place-items: center;
  position: relative;
  box-shadow: 0 4px 16px rgba(217,127,80,0.25);
}
.nav-mark::after {
  content: "";
  position: absolute; inset: 1px;
  border-radius: 9px;
  background:
    radial-gradient(ellipse 70% 50% at 30% 30%, rgba(255,255,255,0.20), transparent 70%);
}
.nav-brand-name {
  font-family: 'Sarina', cursive;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 0;
  color: var(--fg);
}
.nav-links {
  display: flex; align-items: center;
  gap: 4px;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 160ms, background 160ms;
  position: relative;
  cursor: pointer;
}
.nav-link:hover { color: var(--fg); }
.nav-link.active {
  color: var(--fg);
  background: rgba(247,241,230,0.06);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-burger {
  display: none;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid rgba(247,241,230,0.12);
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-burger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 200ms, opacity 200ms;
}
.nav.open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-burger span:nth-child(2) { opacity: 0; }
.nav.open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0 20px;
  border-top: 1px solid rgba(247,241,230,0.08);
  margin-top: 0;
}
.nav-mobile-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--fg-muted);
  padding: 14px 8px;
  border-radius: 10px;
}
.nav-mobile-link.active { color: var(--fg); background: rgba(247,241,230,0.06); }
.nav-mobile .btn { margin-top: 12px; align-self: flex-start; }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav.open .nav-mobile { display: flex; }
}
.nav-signin {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  padding: 8px 14px;
  cursor: pointer;
  transition: color 160ms;
  white-space: nowrap;
}
.nav-signin:hover { color: var(--fg); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 13px 22px;
  transition: transform 120ms cubic-bezier(.2,.8,.2,1), background 160ms, box-shadow 200ms, color 160ms;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: var(--twist-ink-900);
  box-shadow: 0 0 0 1px rgba(217,127,80,0.30), 0 14px 36px rgba(217,127,80,0.22);
}
.btn-primary:hover {
  background: var(--twist-clay-400);
  box-shadow: 0 0 0 1px rgba(217,127,80,0.45), 0 18px 44px rgba(217,127,80,0.30);
}
.btn-primary .arrow {
  font-family: var(--font-mono); font-weight: 500;
}
.btn-ghost {
  background: rgba(247,241,230,0.06);
  color: var(--fg);
  box-shadow: inset 0 0 0 1px rgba(247,241,230,0.12);
}
.btn-ghost:hover {
  background: rgba(247,241,230,0.10);
  box-shadow: inset 0 0 0 1px rgba(247,241,230,0.20);
}
.btn-link {
  background: transparent;
  color: var(--fg);
  padding: 8px 0;
  gap: 6px;
}
.btn-link:hover { color: var(--accent); }
.btn-sm { padding: 10px 16px; font-size: 13px; }
.btn-lg { padding: 17px 28px; font-size: 16px; }

/* ===== ETIQUETTE — eyebrows, captions, dividers ===== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(217,127,80,0.6);
}
.section-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--fg-faint);
  text-transform: uppercase;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 100px 0 calc(var(--mode-section-pad) - 20px);
  overflow: hidden;
  min-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-bloom {
  position: absolute;
  pointer-events: none;
  inset: 0;
  opacity: var(--mode-hero-bloom);
  transition: opacity 400ms;
}
.hero-bloom::before {
  content: "";
  position: absolute;
  top: -200px; left: -200px;
  width: 900px; height: 900px;
  background: radial-gradient(circle at center,
    rgba(59,79,204,0.30) 0%,
    rgba(109,44,126,0.18) 35%,
    rgba(11,19,42,0) 70%);
  filter: blur(20px);
}
.hero-bloom::after {
  content: "";
  position: absolute;
  bottom: -200px; right: -100px;
  width: 800px; height: 800px;
  background: radial-gradient(circle at center,
    rgba(217,127,80,0.22) 0%,
    rgba(180,90,46,0.10) 40%,
    rgba(11,19,42,0) 70%);
  filter: blur(20px);
}

/* subtle grid lines mode-tied */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(247,241,230,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247,241,230,0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent 85%);
  opacity: var(--mode-grid-lines);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.hero-inner--split {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 0;
}
.hero-inner--full {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 32px;
  width: 100%;
}
.hero-copy { min-width: 0; }
.hero-media {
  position: relative;
  align-self: stretch;
  margin: -100px 0 calc((var(--mode-section-pad) - 20px) * -1);
  min-height: calc(100vh - 160px);
  overflow: hidden;
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
  background: #0a0f1f;
}
@media (min-width: 1280px) {
  .hero-media {
    margin-right: calc((100vw - 1280px) / -2);
  }
}

.hero-media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-media-img.is-active { opacity: 1; }
.hero-media-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(11,15,31,0.55) 0%, rgba(11,15,31,0.0) 35%),
    linear-gradient(0deg, rgba(11,15,31,0.35), rgba(11,15,31,0.0) 50%);
}
.hero-media::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 15%;
  width: 1px;
  background: var(--twist-accent-gradient, linear-gradient(180deg, #f59e0b, #ea580c));
  transform-origin: top left;
  /* approximate diagonal: rotate matches polygon slope from (15% top) to (0% bottom) */
  transform: rotate(calc(atan2(85, 100) * 0deg));
  opacity: 0.85;
  /* fallback: simple thin gradient strip along the diagonal via skew */
}
@media (max-width: 1100px) {
  .hero-inner--split { grid-template-columns: 1fr; gap: 0; text-align: center; justify-items: center; }
  .hero-inner--full { padding-left: 24px; padding-right: 24px; }
  .hero-media { display: none; }
  .hero-copy { width: 100%; max-width: 720px; text-align: center; display: flex; flex-direction: column; align-items: center; }
  .hero-eyebrow-row { justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-display {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    text-wrap: balance;
  }
  .hero-lede { margin-left: auto; margin-right: auto; }
}

.hero-eyebrow-row {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
}
.hero-eyebrow-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  background: rgba(247,241,230,0.05);
  box-shadow: inset 0 0 0 1px rgba(247,241,230,0.10);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
}
.hero-eyebrow-pill .badge {
  background: var(--twist-gradient);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}
.hero-display {
  font-family: var(--font-display);
  font-weight: var(--mode-display-weight);
  font-size: calc(clamp(54px, 8.5vw, 124px) * var(--mode-display-scale));
  line-height: 0.95;
  letter-spacing: var(--mode-display-tracking);
  margin: 0;
  max-width: 18ch;
}
.hero-display .accent {
  position: relative;
  display: inline-block;
}
.hero-display .accent.gradient {
  background: var(--twist-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-display .accent .underwave {
  position: absolute;
  left: 0; right: 0; bottom: -0.05em;
  height: 8px;
  background: var(--twist-gradient);
  border-radius: 999px;
  opacity: calc(1 - var(--mode-gradient-headline) * 1);
}

.hero-lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 56ch;
  margin: 28px auto 0;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}
.hero-meta-item {
  padding: 8px 24px 8px 0;
  border-right: 1px solid var(--border);
}
.hero-meta-item:last-child { border-right: 0; }
.hero-meta-item:first-child { padding-left: 0; }
.hero-meta-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--fg);
  display: inline-flex; align-items: baseline; gap: 2px;
}
.hero-meta-num .sym { font-family: var(--font-mono); font-size: 20px; font-weight: 500; color: var(--fg-muted); margin-right: 2px; }
.hero-meta-num .plus { color: var(--accent); margin-left: 1px; font-weight: 700; }
.hero-meta-lab {
  font-size: 12px;
  color: var(--fg-faint);
  letter-spacing: 0.02em;
}

/* ===== LOGO STRIP ===== */
.logos {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(247,241,230,0.015);
  padding: 28px 0;
}
.logos-row {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: nowrap;
}
.logos-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  flex-shrink: 0;
}
.logos-marquee {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.logos-track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: logos-scroll 36s linear infinite;
}
.logos-marquee:hover .logos-track { animation-play-state: paused; }
.logos-track img {
  height: 26px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.55;
  transition: opacity 200ms;
  flex-shrink: 0;
}
.logos-track img:hover { opacity: 0.85; }
.logos-track img.logo-raw,
.work-card-logo[src*="we-are-social"] { filter: none; opacity: 0.95; }
@keyframes logos-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .logos-track { animation: none; }
}

/* ===== SECTIONS ===== */
.section {
  padding: var(--mode-section-pad) 0;
  position: relative;
}
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 64px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.4vw, 60px);
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0;
  max-width: 18ch;
}
.section-head .lead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 44ch;
  margin: 0;
  align-self: end;
}
.section-eyebrow-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}
@media (max-width: 880px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; }
  .hero-meta { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .hero-meta-item:nth-child(2) { border-right: 0; }
}

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.service-card {
  background: var(--twist-navy-900);
  border-radius: 24px;
  padding: 32px 32px 28px;
  box-shadow: var(--inner-stroke);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(.2,.8,.2,1), box-shadow 200ms;
  display: flex; flex-direction: column;
  min-height: 380px;
}
.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--inner-stroke-strong), 0 28px 60px rgba(11,19,42,0.5);
}
.service-card-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--fg-faint);
  text-transform: uppercase;
  margin-bottom: 80px;
}
.service-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 12px;
}
.service-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0 0 24px;
  max-width: 38ch;
}
.service-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.service-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(247,241,230,0.04);
  color: var(--fg-muted);
  box-shadow: inset 0 0 0 1px rgba(247,241,230,0.08);
  white-space: nowrap;
}
.service-card-arrow {
  position: absolute;
  top: 28px; right: 28px;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: rgba(247,241,230,0.06);
  display: grid; place-items: center;
  color: var(--fg-muted);
  font-family: var(--font-mono); font-size: 14px;
  transition: background 200ms, color 200ms, transform 200ms;
}
.service-card:hover .service-card-arrow {
  background: var(--accent);
  color: var(--twist-ink-900);
  transform: rotate(-45deg);
}
.service-card.featured {
  background: linear-gradient(160deg, #1A2647 0%, #121B36 60%, #0B132A 100%);
  box-shadow: var(--inner-stroke-strong);
}
.service-card.featured::before {
  display: none;
}

.service-card.service-card-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  padding: 0;
  min-height: 320px;
  overflow: hidden;
}
.service-card-wide .service-card-text {
  flex: 1 1 50%;
  padding: 36px 40px;
  display: flex; flex-direction: column;
  position: relative; z-index: 2;
}
.service-card-wide .service-card-frame {
  flex: 1 1 50%;
  position: relative;
  background: linear-gradient(135deg, #1A2647 0%, var(--accent) 100%);
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%);
  margin-left: -6%;
}

@media (max-width: 880px) {
  .services-grid { grid-template-columns: 1fr; }
  .service-card.service-card-wide { flex-direction: column; }
  .service-card-wide .service-card-frame {
    clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 100%);
    margin-left: 0; min-height: 200px;
  }
}

/* ===== SERVICE STACK (homepage) ===== */
.service-stack { margin-top: 32px; }
.service-stack-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: start;
}
.service-stack-cards {
  position: relative;
  min-height: 440px;
}
.service-stack-card {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  transition: transform 500ms cubic-bezier(.2,.8,.2,1),
              opacity 400ms ease,
              box-shadow 300ms ease;
  will-change: transform, opacity;
}
.service-stack-card[data-pos="front"] {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  z-index: 3;
}
.service-stack-card[data-pos="mid"] {
  transform: translate3d(0, -22px, 0) scale(0.96);
  opacity: 0.7;
  z-index: 2;
  pointer-events: none;
}
.service-stack-card[data-pos="back"] {
  transform: translate3d(0, -44px, 0) scale(0.92);
  opacity: 0.4;
  z-index: 1;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .service-stack-card { transition: none; }
}

.service-stack-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.service-stack-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--twist-navy-900);
  box-shadow: var(--inner-stroke-strong), 0 28px 60px rgba(11,19,42,0.5);
}
.service-stack-frame-chrome {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(247,241,230,0.04);
  border-bottom: 1px solid rgba(247,241,230,0.06);
}
.service-stack-frame-chrome span {
  width: 10px; height: 10px; border-radius: 999px;
  background: rgba(247,241,230,0.18);
}
.service-stack-frame img {
  display: block;
  width: 100%;
  height: auto;
}
.service-stack-caption {
  display: flex; flex-direction: column; gap: 4px;
}
.service-stack-caption-lab {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.service-stack-caption-body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-muted);
}
.service-stack-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}
.service-stack-btn {
  width: 40px; height: 40px;
  border-radius: 999px;
  background: rgba(247,241,230,0.06);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 16px;
  display: grid; place-items: center;
  cursor: pointer;
  border: 0;
  transition: background 200ms, color 200ms;
}
.service-stack-btn:hover {
  background: var(--accent);
  color: var(--twist-ink-900);
}
.service-stack-dots {
  display: flex; gap: 8px; flex: 1;
  justify-content: center;
}
.service-stack-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(247,241,230,0.18);
  cursor: pointer;
  padding: 0;
  transition: background 200ms, transform 200ms;
}
.service-stack-dot.is-active {
  background: var(--accent);
  transform: scale(1.3);
}

@media (max-width: 880px) {
  .service-stack-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .service-stack-grid > .service-stack-side { order: -1; }
  .service-stack-cards { min-height: 460px; }
  .service-stack-btn { display: none; }
}

/* ===== OLD vs NEW COMPARE ===== */
.compare {
  background: linear-gradient(180deg, var(--twist-navy-950) 0%, var(--twist-navy-900) 50%, var(--twist-navy-950) 100%);
  position: relative;
  overflow: hidden;
}
.compare-toggle {
  display: inline-flex;
  background: rgba(247,241,230,0.04);
  box-shadow: inset 0 0 0 1px rgba(247,241,230,0.10);
  border-radius: 999px;
  padding: 4px;
  position: relative;
  margin-bottom: 56px;
}
.compare-toggle button {
  border: 0;
  background: transparent;
  color: var(--fg-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 10px 22px;
  cursor: pointer;
  border-radius: 999px;
  position: relative;
  z-index: 2;
  transition: color 240ms;
  white-space: nowrap;
}
.compare-toggle button.active { color: var(--twist-ink-900); }
.compare-toggle .slider {
  position: absolute;
  top: 4px; bottom: 4px;
  width: calc(50% - 4px);
  background: var(--accent);
  border-radius: 999px;
  transition: transform 320ms cubic-bezier(.2,.8,.2,1);
  z-index: 1;
}
.compare-toggle[data-side="new"] .slider {
  transform: translateX(100%);
}

.compare-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-radius: 28px;
  background: var(--twist-navy-900);
  box-shadow: var(--inner-stroke-strong), var(--shadow-lg);
  overflow: hidden;
  position: relative;
}
.compare-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
}
.compare-table::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: var(--border-strong);
}
.compare-col {
  padding: 40px;
  transition: opacity 320ms, filter 320ms;
}
.compare-col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.compare-col-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.compare-col-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.025em;
  margin: 0;
}
.compare-col.old .compare-col-title { color: #C9C2B4; }
.compare-col.new .compare-col-title {
  background: var(--twist-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.compare-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.compare-pill.old { background: rgba(196,68,56,0.10); color: #E08A82; box-shadow: inset 0 0 0 1px rgba(196,68,56,0.20); }
.compare-pill.new { background: rgba(47,143,94,0.12); color: #6BC498; box-shadow: inset 0 0 0 1px rgba(47,143,94,0.25); }
.compare-list { display: flex; flex-direction: column; gap: 14px; }
.compare-row {
  display: flex; align-items: flex-start; gap: 14px;
  font-size: 15px; line-height: 1.5;
}
.compare-row .mk {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 999px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12px;
  margin-top: 1px;
}
.compare-row .mk.x { background: rgba(196,68,56,0.12); color: #E08A82; }
.compare-row .mk.tick { background: rgba(47,143,94,0.18); color: #6BC498; }
.compare-row.old { color: var(--fg-muted); }
.compare-row.new { color: var(--fg); }

.compare-table[data-side="old"] .compare-col.new { opacity: 0.35; filter: blur(0px); }
.compare-table[data-side="new"] .compare-col.old { opacity: 0.35; }

@media (max-width: 880px) {
  .compare-table { grid-template-columns: 1fr; }
  .compare-table::before { display: none; }
}

/* ===== STATS COUNTER ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat {
  padding: 56px 32px;
  position: relative;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: 0; }
.stat-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 24px;
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0 0 16px;
  display: flex; align-items: baseline; gap: 2px;
  color: var(--fg);
}
.stat-num.gradient {
  background: var(--twist-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-num .pre, .stat-num .suf {
  font-family: var(--font-mono);
  font-size: 0.4em;
  font-weight: 500;
  color: var(--fg-muted);
  -webkit-text-fill-color: var(--fg-muted);
}
.stat-num .pre { margin-right: 4px; }
.stat-num .suf { margin-left: 6px; }
.stat-cap {
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-muted);
  max-width: 28ch;
}
@media (max-width: 880px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--border); }
}

/* ===== TOOLS ===== */
.tools {
  position: relative;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--inner-stroke);
}
.tool {
  background: var(--twist-navy-900);
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 140px;
  text-align: center;
  transition: background 200ms;
  cursor: default;
}
.tool:hover { background: var(--twist-navy-800); }
.tool-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
}
.tool-glyph {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.04em;
  color: var(--fg);
  background: rgba(247,241,230,0.04);
  box-shadow: inset 0 0 0 1px rgba(247,241,230,0.08);
}
@media (max-width: 880px) {
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== CASE STUDY TEASER ===== */
.casestudy {
  background: linear-gradient(180deg, var(--twist-navy-950) 0%, #0E1632 100%);
}
.casestudy-card {
  border-radius: 32px;
  background: linear-gradient(160deg, #1A2647 0%, #121B36 60%);
  box-shadow: var(--inner-stroke-strong), var(--shadow-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  position: relative;
  overflow: hidden;
}
.casestudy-card::before {
  content: "";
  position: absolute;
  top: -20%; right: -10%;
  width: 480px; height: 480px;
  background: radial-gradient(circle at center,
    rgba(217,127,80,0.20) 0%,
    rgba(109,44,126,0.10) 40%,
    rgba(11,19,42,0) 70%);
  pointer-events: none;
}
.casestudy-card .left { position: relative; z-index: 1; }
.casestudy-card .right { position: relative; z-index: 1; }
.casestudy-attr {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
}
.casestudy-attr img {
  height: 24px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
.casestudy-quote {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0 0 32px;
  text-wrap: balance;
}
.casestudy-quote span.hi {
  background: var(--twist-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.casestudy-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--fg-muted);
}
.casestudy-meta .sep { color: var(--fg-faint); }
.casestudy-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.casestudy-kpi {
  background: rgba(11,19,42,0.55);
  padding: 28px 24px;
}
.casestudy-kpi-lab {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-faint); margin-bottom: 12px;
}
.casestudy-kpi-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0;
}
.casestudy-kpi-num .plus { color: var(--accent); }
.casestudy-kpi-sub { font-size: 12px; color: var(--fg-muted); margin-top: 8px; }

@media (max-width: 880px) {
  .casestudy-card { grid-template-columns: 1fr; padding: 36px 28px; gap: 36px; }
}

/* ===== FAQ ===== */
.faq-list {
  border-top: 1px solid var(--border);
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 0;
  background: transparent;
  border: 0;
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.015em;
  text-align: left;
  cursor: pointer;
  transition: color 160ms;
}
.faq-q:hover { color: var(--accent); }
.faq-q .ic {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: rgba(247,241,230,0.06);
  display: grid; place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: transform 280ms, background 200ms;
  font-family: var(--font-mono); font-weight: 500;
  position: relative;
  color: var(--fg-muted);
}
.faq-item.open .faq-q .ic {
  transform: rotate(45deg);
  background: var(--accent);
  color: var(--twist-ink-900);
}
.faq-q .ic::before {
  content: "+";
  font-size: 16px;
  line-height: 1;
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 360ms cubic-bezier(.2,.8,.2,1);
}
.faq-a-inner {
  padding: 0 64px 32px 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 70ch;
}
.faq-item.open .faq-a { max-height: 300px; }

/* ===== BIG CTA STRIP ===== */
.ctastrip {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}
.ctastrip::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 70% at 80% 50%, rgba(217,127,80,0.18) 0%, rgba(11,19,42,0) 70%),
    radial-gradient(ellipse 50% 70% at 20% 50%, rgba(59,79,204,0.15) 0%, rgba(11,19,42,0) 70%);
}
.ctastrip-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 72px 48px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%),
    linear-gradient(180deg, var(--twist-navy-900), var(--twist-navy-950));
  box-shadow:
    0 40px 80px -40px rgba(0,0,0,.6),
    inset 0 1px 0 rgba(255,255,255,.04);
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.ctastrip-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 68px);
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0;
  max-width: 18ch;
}
.ctastrip-body {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0;
  max-width: 52ch;
}
.ctastrip-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
@media (max-width: 880px) {
  .ctastrip { padding: 80px 0; }
  .ctastrip-card { padding: 48px 24px; }
}


/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 40px;
}
.footer-row {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 64px;
}
.footer-brand p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.55;
  max-width: 30ch;
  margin: 16px 0 0;
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin: 0 0 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
  font-size: 14px;
  color: var(--fg-muted);
  transition: color 160ms;
}
.footer-col a:hover { color: var(--fg); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  font-size: 12px;
  color: var(--fg-faint);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
@media (max-width: 880px) {
  .footer-row { grid-template-columns: 1fr 1fr; }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  transition: color 160ms, border-color 160ms, background 160ms;
}
.footer-social:hover {
  color: var(--fg);
  border-color: var(--fg-muted);
  background: rgba(255,255,255,0.04);
}
.footer-bottom-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.footer-bottom-right a {
  color: var(--fg-faint);
  transition: color 160ms;
}
.footer-bottom-right a:hover { color: var(--fg); }

/* Cookie consent */
.cookie-consent {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: 380px;
  background: var(--surface, #14181f);
  color: var(--fg, #f5f1e8);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
  font-size: 13px;
  line-height: 1.5;
}
.cookie-consent p { margin: 0 0 14px; color: var(--fg-muted); }
.cookie-consent a { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }
.cookie-consent-actions { display: flex; gap: 8px; justify-content: flex-end; }
.cookie-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 160ms, transform 160ms, background 160ms;
}
.cookie-btn-ghost { background: transparent; color: var(--fg-muted); }
.cookie-btn-ghost:hover { color: var(--fg); }
.cookie-btn-primary {
  background: var(--twist-gradient);
  color: #fff;
  border-color: transparent;
}
.cookie-btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }
@media (max-width: 540px) {
  .cookie-consent { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* ===== MODAL & TOAST ===== */
.modal-bg {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(11,19,42,0.65);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  animation: fade 220ms cubic-bezier(.2,.8,.2,1);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #FAF6EE;
  color: #1F1A14;
  width: min(540px, 92vw);
  border-radius: 28px;
  padding: 40px 40px 36px;
  box-shadow: 0 50px 120px rgba(11,19,42,0.50);
  animation: pop 320ms cubic-bezier(.2,.8,.2,1);
}
@keyframes pop { from { transform: translateY(12px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal .step { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: #B45A2E; margin-bottom: 8px; }
.modal h3 { font-family: 'Open Sans', sans-serif; font-weight: 700; font-size: 30px; letter-spacing: -0.025em; margin: 0 0 8px; line-height: 1.1; }
.modal p { font-size: 15px; color: #5A4E40; margin: 0 0 28px; line-height: 1.55; }
.modal .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.modal label { font-size: 12px; font-weight: 700; color: #5A4E40; letter-spacing: 0.02em; }
.modal input, .modal select {
  font-family: 'Open Sans', sans-serif; font-size: 15px; color: #1F1A14;
  background: #FFFFFF;
  border: 1px solid rgba(31,26,20,0.12);
  border-radius: 14px; padding: 14px 16px; outline: 0;
}
.modal input:focus, .modal select:focus { border-color: #B45A2E; box-shadow: 0 0 0 3px rgba(180,90,46,0.18); }
.modal .actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; }
.modal .submit {
  flex: 1;
  padding: 16px 26px; border-radius: 999px; border: 0;
  background: #1F1A14; color: #FAF6EE;
  font-family: 'Open Sans', sans-serif; font-weight: 700; font-size: 15px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.modal .cancel { background: transparent; border: 0; color: #7E6E5B; cursor: pointer; padding: 12px 18px; font-weight: 600; }
.modal .success { text-align: center; padding: 16px 4px; }
.modal .success .check {
  width: 64px; height: 64px; border-radius: 999px;
  background: linear-gradient(135deg,#3B4FCC,#6D2C7E,#D97F50);
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 16px 40px rgba(109,44,126,0.35);
}
.modal .success .check::after { content: ""; width: 20px; height: 10px; border-left: 3px solid #FAF6EE; border-bottom: 3px solid #FAF6EE; transform: rotate(-45deg) translate(0px,-2px); }

.toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 90;
  background: var(--twist-navy-800);
  color: #F7F1E6;
  padding: 14px 22px;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(11,19,42,0.50), inset 0 0 0 1px rgba(247,241,230,0.10);
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 12px;
  animation: pop 240ms cubic-bezier(.2,.8,.2,1);
}
.toast .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); }

/* ============ CASE STUDY PAGE ============ */
.cs-hero {
  padding: 80px 0 120px;
  border-bottom: 1px solid var(--border);
}
.cs-hero-meta {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.cs-hero-meta img { height: 24px; filter: brightness(0) invert(1); opacity: 0.9; flex-shrink: 0; }
.cs-hero-meta .sep { width: 1px; height: 18px; background: var(--border-strong); flex-shrink: 0; }
.cs-hero-meta .name { font-family: var(--font-display); font-weight: 700; font-size: 16px; white-space: nowrap; }
.cs-hero-meta .tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-muted);
  padding: 4px 10px; border-radius: 999px;
  background: rgba(247,241,230,0.04);
  box-shadow: inset 0 0 0 1px rgba(247,241,230,0.10);
  white-space: nowrap;
}
.cs-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 6vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin: 0 0 36px;
}
.cs-title .hi {
  background: var(--twist-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cs-subtitle {
  font-size: 20px;
  line-height: 1.5;
  color: var(--fg-muted);
  max-width: 56ch;
  margin: 0;
}

.cs-hero-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px;
  align-items: end;
  padding-top: 24px;
}
.cs-hero-side {
  display: flex; flex-direction: column; gap: 16px;
  border-left: 1px solid var(--border);
  padding-left: 32px;
}
.cs-fact {
  display: flex; flex-direction: column; gap: 4px;
}
.cs-fact-lab { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-faint); }
.cs-fact-val { font-size: 15px; color: var(--fg); font-weight: 500; }

.cs-results {
  padding: 100px 0;
  background: linear-gradient(180deg, var(--twist-navy-950) 0%, #0E1632 100%);
}
.cs-results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}
.cs-result {
  padding: 56px 32px;
  border-right: 1px solid var(--border);
}
.cs-result:last-child { border-right: 0; }
.cs-result-lab {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-faint); margin-bottom: 16px;
}
.cs-result-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 5vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0 0 16px;
}
.cs-result-num .pre { font-family: var(--font-mono); font-size: 0.45em; color: var(--fg-muted); font-weight: 500; margin-right: 4px; }
.cs-result-num .delta {
  background: var(--twist-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cs-result-cap { font-size: 13px; color: var(--fg-muted); }

.cs-body {
  padding: 120px 0;
}
.cs-body-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  align-items: start;
}
.cs-body-aside {
  position: sticky;
  top: 100px;
}
.cs-body-aside .label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-faint); margin-bottom: 12px;
}
.cs-body-aside h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 24px;
}
.cs-body-aside p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.55;
}
.cs-body-content {
  display: flex; flex-direction: column; gap: 48px;
}
.cs-body-content h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.cs-body-content p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: 64ch;
}
.cs-body-content p strong {
  color: var(--fg);
  font-weight: 600;
}
.cs-body-section {
  border-top: 1px solid var(--border);
  padding-top: 32px;
}
.cs-body-section:first-child { border-top: 0; padding-top: 0; }

.cs-pullquote {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(247,241,230,0.015);
}
.cs-pullquote-inner {
  max-width: 980px; margin: 0 auto; padding: 0 32px;
}
.cs-pullquote q {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.5vw, 44px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  display: block;
  margin: 0 0 32px;
  quotes: none;
}
.cs-pullquote q::before, .cs-pullquote q::after { content: ""; }
.cs-pullquote .attribution { display: flex; align-items: center; gap: 16px; }
.cs-pullquote .avatar {
  width: 56px; height: 56px; border-radius: 999px;
  background: var(--twist-gradient);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  color: #fff;
}
.cs-pullquote .attribution-text {
  display: flex; flex-direction: column; gap: 2px;
}
.cs-pullquote .who { font-weight: 600; font-size: 15px; }
.cs-pullquote .role { font-size: 13px; color: var(--fg-muted); }

@media (max-width: 880px) {
  .cs-hero-grid { grid-template-columns: 1fr; }
  .cs-hero-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 32px; }
  .cs-results-grid { grid-template-columns: repeat(2, 1fr); }
  .cs-result:nth-child(2) { border-right: 0; }
  .cs-result:nth-child(1), .cs-result:nth-child(2) { border-bottom: 1px solid var(--border); }
  .cs-body-grid { grid-template-columns: 1fr; gap: 32px; }
  .cs-body-aside { position: static; }
}
.bg-amber-600 { background-color: #d97706 !important; }

/* ===== Work index ===== */
.work-hero { padding-top: 80px; padding-bottom: 40px; }
.work-filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 40px;
}
.work-filter {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-muted);
  padding: 8px 16px; border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--border);
  cursor: pointer; transition: all 0.18s ease;
}
.work-filter:hover { color: var(--fg); box-shadow: inset 0 0 0 1px var(--border-strong); }
.work-filter.is-active {
  color: var(--twist-navy-950);
  background: var(--fg);
  box-shadow: inset 0 0 0 1px var(--fg);
}

.work-list { padding-top: 24px; padding-bottom: 100px; }
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.work-card {
  display: flex; flex-direction: column;
  border-radius: 16px;
  background: rgba(247,241,230,0.02);
  box-shadow: inset 0 0 0 1px var(--border);
  text-decoration: none; color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  overflow: hidden;
}
.work-card:hover {
  transform: translateY(-2px);
  background: rgba(247,241,230,0.04);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.work-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--twist-navy-950);
  border-bottom: 1px solid var(--border);
}
.work-card-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  transition: transform 0.5s ease;
}
.work-card:hover .work-card-img { transform: scale(1.03); }
.work-card-badge {
  position: absolute; top: 14px; left: 14px;
  z-index: 1;
}
.work-card-top {
  display: flex; justify-content: flex-end; align-items: center;
  gap: 12px; padding: 24px 28px 0;
}
.work-card-vertical {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-faint);
  text-align: right;
}
.work-card-id {
  display: flex; align-items: center; gap: 14px;
  margin: 16px 28px 16px;
}
.work-card-line {
  font-size: 16px; line-height: 1.5; color: var(--fg-muted);
  margin: 0 28px auto;
}
.work-card-logo {
  height: 28px; width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.work-card-mark {
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  background: var(--twist-gradient); color: #fff;
}
.work-card-client {
  font-family: var(--font-display); font-weight: 700;
  font-size: 22px; letter-spacing: -0.02em;
  margin: 0;
}
.work-card-foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: 24px;
  padding: 20px 28px 24px;
  border-top: 1px solid var(--border);
}
.work-card-metric { display: flex; flex-direction: column; gap: 4px; }
.work-card-metric-lab {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-faint);
}
.work-card-metric-val {
  font-family: var(--font-display); font-weight: 700;
  font-size: 22px; letter-spacing: -0.02em;
  background: var(--twist-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.work-card-read {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg);
}
.work-card-read .arrow { display: inline-block; margin-left: 4px; transition: transform 0.2s ease; }
.work-card:hover .work-card-read .arrow { transform: translateX(4px); }

/* Badges */
.work-badge {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  white-space: nowrap;
}
.work-badge-twist {
  color: var(--twist-navy-950);
  background: var(--twist-gradient);
}
.work-badge-operator {
  color: var(--fg-muted);
  background: rgba(247,241,230,0.04);
  box-shadow: inset 0 0 0 1px rgba(247,241,230,0.12);
}

/* ===== Detail extras ===== */
.cs-snapshot-wrap {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.cs-snapshot {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cs-snapshot-cell {
  padding: 24px 20px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
}
.cs-snapshot-cell:last-child { border-right: 0; }
.cs-snapshot-lab {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-faint);
}
.cs-snapshot-val {
  font-size: 14px; color: var(--fg); font-weight: 500;
  line-height: 1.4;
}

.cs-learnings {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  background: rgba(247,241,230,0.015);
}
.cs-learnings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 32px;
}
.cs-learning h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 18px; letter-spacing: -0.015em;
  margin: 0 0 12px;
}
.cs-learning-dash { color: var(--fg-faint); font-weight: 400; }
.cs-learning p {
  font-size: 15px; line-height: 1.6; color: var(--fg-muted);
  margin: 0;
}

.cs-adjacent { padding: 80px 0; border-top: 1px solid var(--border); }
.cs-adjacent-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.cs-adjacent-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 28px;
  border-radius: 14px;
  background: rgba(247,241,230,0.02);
  box-shadow: inset 0 0 0 1px var(--border);
  text-decoration: none; color: inherit;
  transition: background 0.2s ease;
}
.cs-adjacent-card:hover { background: rgba(247,241,230,0.05); }
.cs-adjacent-next { text-align: right; }
.cs-adjacent-dir {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-faint);
}
.cs-adjacent-client {
  font-family: var(--font-display); font-weight: 700;
  font-size: 22px; letter-spacing: -0.02em;
  color: var(--fg);
}
.cs-adjacent-line { font-size: 14px; color: var(--fg-muted); line-height: 1.5; }

@media (max-width: 880px) {
  .work-grid { grid-template-columns: 1fr; }
  .cs-snapshot { grid-template-columns: repeat(2, 1fr); }
  .cs-snapshot-cell:nth-child(2) { border-right: 0; }
  .cs-snapshot-cell:nth-child(5) {
    grid-column: span 2; border-right: 0; border-top: 1px solid var(--border);
  }
  .cs-snapshot-cell:nth-child(odd):not(:last-child) { border-right: 1px solid var(--border); }
  .cs-snapshot-cell:nth-child(3), .cs-snapshot-cell:nth-child(4) {
    border-top: 1px solid var(--border);
  }
  .cs-learnings-grid { grid-template-columns: 1fr; gap: 32px; }
  .cs-adjacent-grid { grid-template-columns: 1fr; }
  .cs-adjacent-next { text-align: left; }
}


/* Featured image on detail hero */
.cs-feature {
  padding: 0 0 80px;
}
.cs-feature-frame {
  border-radius: 18px;
  overflow: hidden;
  background: var(--twist-navy-950);
  box-shadow: inset 0 0 0 1px var(--border);
  aspect-ratio: 16 / 9;
}
.cs-feature-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
@media (max-width: 880px) {
  .cs-feature { padding-bottom: 48px; }
}


/* ============================================================
   Case Study Deck (homepage proof — stacked rotating cards)
   ============================================================ */
.cs-deck {
  position: relative;
  margin-top: 56px;
  outline: none;
}
.cs-deck:focus-visible { box-shadow: 0 0 0 2px var(--twist-violet); border-radius: 24px; }

.cs-deck-stack {
  position: relative;
  height: 460px;
  perspective: 1400px;
}

.cs-deck-card {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: linear-gradient(180deg, var(--twist-navy-900), var(--twist-navy-950));
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 30px 60px -30px rgba(0,0,0,.55),
    inset 0 0 0 1px rgba(255,255,255,.02);
  transition:
    transform 600ms cubic-bezier(.2,.7,.2,1),
    opacity 600ms cubic-bezier(.2,.7,.2,1),
    filter 600ms cubic-bezier(.2,.7,.2,1);
  will-change: transform, opacity;
}
.cs-deck-card[data-offset="0"] {
  transform: translate3d(0,0,0) scale(1);
  opacity: 1;
  z-index: 3;
  filter: none;
}
.cs-deck-card[data-offset="1"] {
  transform: translate3d(18px, 22px, 0) scale(.965);
  opacity: .72;
  z-index: 2;
  filter: saturate(.85);
  pointer-events: none;
}
.cs-deck-card[data-offset="2"] {
  transform: translate3d(36px, 44px, 0) scale(.93);
  opacity: .45;
  z-index: 1;
  filter: saturate(.7);
  pointer-events: none;
}

.cs-deck-media {
  position: relative;
  background: #000;
  overflow: hidden;
}
.cs-deck-media img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
.cs-deck-media .work-badge {
  position: absolute;
  top: 16px; left: 16px;
}

.cs-deck-body {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
}
.cs-deck-hero { margin-bottom: 4px; }
.cs-deck-hero-val {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(40px, 5.2vw, 72px);
  line-height: .95;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, #fff 0%, var(--twist-violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  word-break: break-word;
}
.cs-deck-hero-lab {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

.cs-deck-client {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--fg);
  margin: 0;
}
.cs-deck-line {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 44ch;
  margin: 0;
}
.cs-deck-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cs-deck-meta .sep { opacity: .4; }

.cs-deck-controls {
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.cs-deck-arrow {
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  font-size: 16px;
  cursor: pointer;
  transition: background 180ms, border-color 180ms, transform 180ms;
}
.cs-deck-arrow:hover { background: rgba(255,255,255,.04); border-color: var(--twist-violet); }
.cs-deck-arrow:active { transform: scale(.94); }

.cs-deck-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}
.cs-deck-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.18);
  padding: 0;
  cursor: pointer;
  transition: background 180ms, width 180ms;
}
.cs-deck-dot.is-active {
  background: var(--twist-violet);
  width: 22px;
}

@media (max-width: 880px) {
  .cs-deck-stack { height: 620px; }
  .cs-deck-card {
    grid-template-columns: 1fr;
    grid-template-rows: 220px 1fr;
  }
  .cs-deck-body { padding: 28px 24px; }
  .cs-deck-hero-val { font-size: 64px; }
  .cs-deck-card[data-offset="1"] { transform: translate3d(10px, 14px, 0) scale(.97); }
  .cs-deck-card[data-offset="2"] { transform: translate3d(20px, 28px, 0) scale(.94); }
}

@media (prefers-reduced-motion: reduce) {
  .cs-deck-card { transition: opacity 200ms ease; }
}
