/* Loyaltio Case Study — shared system
   Inspired by the reference site at home.loyaltio-demo.com
*/

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

:root {
  /* type */
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Geist', 'Inter', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;

  /* base palette — paper feel */
  --paper: #f1ece4;          /* warm off-white background */
  --paper-2: #ebe5da;        /* slightly darker panels */
  --paper-3: #e7e0d2;        /* dividers / muted */
  --ink: #1a1a1a;            /* near-black */
  --ink-2: #3d3a35;
  --ink-3: #6b665d;          /* secondary text */
  --ink-4: #9a948a;          /* tertiary / labels */
  --hairline: rgba(26, 26, 26, 0.12);
  --hairline-strong: rgba(26, 26, 26, 0.22);

  /* per-case-study accent — overridden inline */
  --accent: #cb6843;
  --accent-soft: #e8d3c5;

  /* spatial */
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1320px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─────── header ─────── */
.cs-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(241, 236, 228, 0.78);
  border-bottom: 1px solid var(--hairline);
}
.cs-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.cs-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.cs-logo-mark {
  height: 22px;
  width: auto;
  display: block;
}
.cs-logo-mark path { fill: var(--ink); transition: fill 0.4s ease; }
.cs-nav {
  display: flex; align-items: center; gap: 28px;
  font-size: 13px; color: var(--ink-2);
}
.cs-nav a { transition: color .2s; }
.cs-nav a:hover { color: var(--ink); }
.cs-nav .pill {
  border: 1px solid var(--hairline-strong);
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 13px;
  transition: all .2s;
}
.cs-nav .pill:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.cs-lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  margin-right: 4px;
}
.cs-lang button {
  background: transparent;
  border: 0;
  padding: 6px 4px;
  font: inherit;
  letter-spacing: inherit;
  color: var(--ink-4);
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.cs-lang button:hover { color: var(--ink); }
.cs-lang button[aria-pressed="true"] { color: var(--ink); }
.cs-lang span { color: var(--ink-4); opacity: 0.5; }
@media (max-width: 640px) {
  .cs-lang { font-size: 10px; }
  .cs-lang button { padding: 6px 3px; }
}

/* ─────── eyebrow / metadata ─────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.eyebrow .sep::before { content: '·'; color: var(--ink-4); }
.eyebrow .accent-dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

/* ─────── hero ─────── */
.cs-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px var(--gutter) 48px;
}
.cs-hero h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 5.6vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-weight: 400;
  margin: 24px 0 32px;
  text-wrap: pretty;
  max-width: 22ch;
}
.cs-hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.cs-hero-lede {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.35;
  font-style: italic;
  color: var(--ink-2);
  max-width: 56ch;
  margin-bottom: 40px;
}

.cs-hero-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 20px 0;
}
.cs-hero-meta > div {
  padding: 0 24px;
  border-left: 1px solid var(--hairline);
}
.cs-hero-meta > div:first-child { border-left: 0; padding-left: 0; }
.cs-hero-meta dt {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  margin-bottom: 6px;
}
.cs-hero-meta dd {
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
}

/* ─────── two-column body ─────── */
.cs-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px var(--gutter);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 64px;
  align-items: start;
}
.cs-section + .cs-section { padding-top: 0; }
.cs-section-label {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  position: sticky;
  top: 100px;
  display: flex; flex-direction: column; gap: 6px;
}
.cs-section-label .roman {
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  color: var(--accent);
  letter-spacing: 0;
  text-transform: lowercase;
}
.cs-section h2 {
  font-family: var(--serif);
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin-bottom: 28px;
  text-wrap: pretty;
  max-width: 22ch;
}
.cs-section .body {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 65ch;
}
.cs-section .body p + p { margin-top: 18px; }

/* feature list */
.feature-list { display: grid; gap: 1px; background: var(--hairline); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); margin-top: 36px; }
.feature-list li {
  list-style: none;
  background: var(--paper);
  padding: 22px 0;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  align-items: baseline;
}
.feature-list li .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-4);
}
.feature-list li .title {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--ink);
}
.feature-list li .desc {
  font-size: 15px;
  color: var(--ink-3);
  max-width: 60ch;
}

/* ─────── KPI / impact band ─────── */
.kpi-band {
  background: var(--ink);
  color: var(--paper);
  padding: 80px var(--gutter);
  margin: 80px 0;
  position: relative;
}
.kpi-band::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 50%),
    radial-gradient(circle at 80% 80%, color-mix(in oklab, var(--accent) 10%, transparent), transparent 50%);
  pointer-events: none;
}
.kpi-band-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}
.kpi-band .label {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  margin-bottom: 20px;
}
.kpi-band h3 {
  font-family: var(--serif);
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 400;
  max-width: 22ch;
  margin-bottom: 56px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.kpi-grid > div {
  padding: 32px 24px 0 0;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.kpi-grid > div:last-child { border-right: 0; }
.kpi-grid .num {
  font-family: var(--serif);
  font-size: clamp(48px, 5.5vw, 76px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
  color: var(--paper);
}
.kpi-grid .num em {
  font-style: italic;
  color: var(--accent);
}
.kpi-grid .num .unit {
  font-size: 0.4em;
  font-family: var(--sans);
  font-style: normal;
  letter-spacing: 0;
  color: rgba(255,255,255,0.6);
  margin-left: 4px;
}
.kpi-grid .desc {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  line-height: 1.45;
  max-width: 28ch;
}

/* ─────── footer / nav ─────── */
.cs-footer {
  border-top: 1px solid var(--hairline);
  padding: 64px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}
.cs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 64px;
}
.cs-pager a {
  border: 1px solid var(--hairline);
  padding: 28px;
  border-radius: var(--r-md);
  background: var(--paper);
  transition: all .25s;
  display: block;
}
.cs-pager a:hover {
  border-color: var(--ink);
  background: var(--paper-2);
  transform: translateY(-2px);
}
.cs-pager .label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-4); margin-bottom: 8px; }
.cs-pager h4 { font-family: var(--serif); font-size: 22px; line-height: 1.15; letter-spacing: -0.01em; font-weight: 400; }
.cs-pager .next { text-align: right; }

.cs-foot-base {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 32px; border-top: 1px solid var(--hairline);
  font-size: 12px; color: var(--ink-3);
}

/* ─────── phones triptych (mobile app showcase) ─────── */
.cs-phones {
  position: relative;
  margin: 36px 0 0;
  padding: 56px 24px 24px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 30%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 65%),
    var(--paper-2);
  border: 1px solid var(--hairline);
  box-shadow: 0 30px 80px -40px rgba(20,20,15,0.32), 0 1px 0 rgba(255,255,255,0.5) inset;
  isolation: isolate;
}
.cs-phones-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  background: rgba(20,20,15,0.62);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.12);
}
.cs-phones-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.cs-phones-stage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: end;
  perspective: 1200px;
  perspective-origin: 50% 60%;
}
.cs-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transform-origin: center bottom;
  transition: transform 0.5s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.cs-phone-1 { transform: rotate(-2.5deg) translateY(18px); }
.cs-phone-2 { transform: translateY(-12px); z-index: 2; }
.cs-phone-3 { transform: rotate(2.5deg) translateY(18px); }
.cs-phones:hover .cs-phone-1 { transform: rotate(-1deg) translateY(12px); }
.cs-phones:hover .cs-phone-2 { transform: translateY(-18px); }
.cs-phones:hover .cs-phone-3 { transform: rotate(1deg) translateY(12px); }

.cs-phone-frame {
  width: 100%;
  aspect-ratio: 9 / 18.5;
  border-radius: 32px;
  background: var(--ink);
  padding: 8px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 0 0 1.5px rgba(0,0,0,0.6),
    0 30px 60px -20px rgba(20,20,15,0.45),
    0 50px 100px -50px rgba(20,20,15,0.55);
  position: relative;
}
.cs-phone-2 .cs-phone-frame {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 0 0 1.5px rgba(0,0,0,0.6),
    0 40px 80px -20px rgba(20,20,15,0.55),
    0 60px 120px -50px rgba(20,20,15,0.6);
}
.cs-phone-frame::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 32%;
  height: 22px;
  background: var(--ink);
  border-radius: 100px;
  z-index: 2;
}
.cs-phone-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 24px;
}
.cs-phone-cap {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
}

.cs-phones figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 32px -24px -24px;
  padding: 16px 24px;
  border-top: 1px solid var(--hairline);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

@media (hover: none) {
  .cs-phones:hover .cs-phone-1,
  .cs-phones:hover .cs-phone-2,
  .cs-phones:hover .cs-phone-3 { transform: none; }
  .cs-phone-1 { transform: rotate(-2deg); }
  .cs-phone-3 { transform: rotate(2deg); }
}

@media (max-width: 720px) {
  .cs-phones { padding: 44px 16px 16px; }
  .cs-phones-stage {
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 280px;
    margin: 0 auto;
  }
  .cs-phone-1, .cs-phone-2, .cs-phone-3 { transform: none; }
  .cs-phones figcaption { flex-direction: column; gap: 4px; margin: 24px -16px -16px; padding: 12px 16px; }
}

/* ─────── editorial photo / dashboard frame ─────── */
.cs-photo {
  position: relative;
  margin-top: 36px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper-3);
  border: 1px solid var(--hairline);
  box-shadow: 0 30px 80px -40px rgba(20,20,15,0.32), 0 1px 0 rgba(255,255,255,0.5) inset;
  isolation: isolate;
}
.cs-photo > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.cs-photo-dashboard > img {
  aspect-ratio: auto;
  background: var(--paper);
}
.cs-photo figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--hairline);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.cs-photo .cs-photo-meta { color: var(--ink-4); }
.cs-photo-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  background: rgba(20,20,15,0.62);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.12);
}
.cs-photo-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: cs-photo-pulse 1.6s ease-out infinite;
}
@keyframes cs-photo-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  100% { box-shadow: 0 0 0 8px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-photo-badge::before { animation: none; }
}
@media (max-width: 640px) {
  .cs-photo { margin-top: 28px; }
  .cs-photo figcaption { flex-direction: column; gap: 4px; padding: 12px 16px; font-size: 10.5px; }
  .cs-photo-badge { top: 10px; left: 10px; padding: 6px 10px 6px 9px; font-size: 10px; }
}

/* ─────── animated app slideshow ─────── */
.cs-slideshow {
  position: relative;
  margin: 36px 0 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  box-shadow: 0 30px 80px -40px rgba(20,20,15,0.32), 0 1px 0 rgba(255,255,255,0.5) inset;
  isolation: isolate;
}
.cs-slideshow-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(to bottom, var(--paper-2), var(--paper-3));
  position: relative;
  z-index: 2;
}
.cs-slideshow-chrome .dots {
  display: inline-flex;
  gap: 6px;
}
.cs-slideshow-chrome .dots span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--paper-3);
  border: 1px solid var(--hairline);
}
.cs-slideshow-chrome .dots span:nth-child(1) { background: #e07b5a; border-color: rgba(0,0,0,0.05); }
.cs-slideshow-chrome .dots span:nth-child(2) { background: #e8b748; border-color: rgba(0,0,0,0.05); }
.cs-slideshow-chrome .dots span:nth-child(3) { background: #6cba6c; border-color: rgba(0,0,0,0.05); }
.cs-slideshow-chrome .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-left: 8px;
}
.cs-slideshow-chrome .label strong {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.005em;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  margin-right: 8px;
}
.cs-slideshow-chrome .live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cs-slideshow-chrome .live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: cs-slideshow-pulse 1.6s ease-out infinite;
}
@keyframes cs-slideshow-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  100% { box-shadow: 0 0 0 7px transparent; }
}

.cs-slideshow-stage {
  position: relative;
  aspect-ratio: 1600 / 910;
  background: var(--paper);
  overflow: hidden;
}
.cs-slideshow-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transform: scale(1.015);
  animation: cs-slide 24s infinite;
  will-change: opacity, transform;
}
.cs-slideshow-stage img:nth-child(1) { animation-delay: 0s; }
.cs-slideshow-stage img:nth-child(2) { animation-delay: 4s; }
.cs-slideshow-stage img:nth-child(3) { animation-delay: 8s; }
.cs-slideshow-stage img:nth-child(4) { animation-delay: 12s; }
.cs-slideshow-stage img:nth-child(5) { animation-delay: 16s; }
.cs-slideshow-stage img:nth-child(6) { animation-delay: 20s; }
@keyframes cs-slide {
  0%       { opacity: 0; transform: scale(1.025); }
  3%       { opacity: 1; transform: scale(1.015); }
  14%      { opacity: 1; transform: scale(1); }
  17%      { opacity: 0; transform: scale(1); }
  100%     { opacity: 0; }
}

.cs-slideshow-foot {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid var(--hairline);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.cs-slideshow-step {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.cs-slideshow-step .num {
  position: relative;
  display: inline-block;
  width: 1.6em;
  text-align: center;
  color: var(--ink);
  font-weight: 500;
}
.cs-slideshow-step .num span {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: cs-step-num 24s infinite;
}
.cs-slideshow-step .num span:nth-child(1) { animation-delay: 0s; }
.cs-slideshow-step .num span:nth-child(2) { animation-delay: 4s; }
.cs-slideshow-step .num span:nth-child(3) { animation-delay: 8s; }
.cs-slideshow-step .num span:nth-child(4) { animation-delay: 12s; }
.cs-slideshow-step .num span:nth-child(5) { animation-delay: 16s; }
.cs-slideshow-step .num span:nth-child(6) { animation-delay: 20s; }
@keyframes cs-step-num {
  0%, 0.5%   { opacity: 0; }
  3%, 16.5%  { opacity: 1; }
  17%, 100%  { opacity: 0; }
}
.cs-slideshow-step .total { color: var(--ink-4); }

.cs-slideshow-caption {
  position: relative;
  height: 1.4em;
  overflow: hidden;
  text-align: center;
  color: var(--ink-2);
  letter-spacing: 0;
  font-family: var(--sans);
  font-size: 13px;
}
.cs-slideshow-caption span {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(6px);
  animation: cs-caption 24s infinite;
}
.cs-slideshow-caption span:nth-child(1) { animation-delay: 0s; }
.cs-slideshow-caption span:nth-child(2) { animation-delay: 4s; }
.cs-slideshow-caption span:nth-child(3) { animation-delay: 8s; }
.cs-slideshow-caption span:nth-child(4) { animation-delay: 12s; }
.cs-slideshow-caption span:nth-child(5) { animation-delay: 16s; }
.cs-slideshow-caption span:nth-child(6) { animation-delay: 20s; }
@keyframes cs-caption {
  0%             { opacity: 0; transform: translateY(8px); }
  3%             { opacity: 1; transform: translateY(0); }
  14%            { opacity: 1; transform: translateY(0); }
  17%            { opacity: 0; transform: translateY(-6px); }
  100%           { opacity: 0; }
}

.cs-slideshow-dots {
  display: inline-flex;
  gap: 5px;
}
.cs-slideshow-dots .pip {
  width: 18px; height: 3px;
  border-radius: 2px;
  background: var(--paper-3);
  position: relative;
  overflow: hidden;
}
.cs-slideshow-dots .pip::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  animation: cs-pip 24s infinite linear;
}
.cs-slideshow-dots .pip:nth-child(1)::after { animation-delay: 0s; }
.cs-slideshow-dots .pip:nth-child(2)::after { animation-delay: 4s; }
.cs-slideshow-dots .pip:nth-child(3)::after { animation-delay: 8s; }
.cs-slideshow-dots .pip:nth-child(4)::after { animation-delay: 12s; }
.cs-slideshow-dots .pip:nth-child(5)::after { animation-delay: 16s; }
.cs-slideshow-dots .pip:nth-child(6)::after { animation-delay: 20s; }
@keyframes cs-pip {
  0%        { transform: scaleX(0); }
  16.6%     { transform: scaleX(1); }
  16.7%     { transform: scaleX(1); }
  100%      { transform: scaleX(1); }
}
.cs-slideshow-dots .pip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--paper-3);
  transform-origin: left;
  animation: cs-pip-reset 24s infinite step-end;
}
.cs-slideshow-dots .pip:nth-child(1)::before { animation-delay: 0s; }
.cs-slideshow-dots .pip:nth-child(2)::before { animation-delay: 4s; }
.cs-slideshow-dots .pip:nth-child(3)::before { animation-delay: 8s; }
.cs-slideshow-dots .pip:nth-child(4)::before { animation-delay: 12s; }
.cs-slideshow-dots .pip:nth-child(5)::before { animation-delay: 16s; }
.cs-slideshow-dots .pip:nth-child(6)::before { animation-delay: 20s; }
@keyframes cs-pip-reset {
  0%, 16.5% { opacity: 0; }
  16.6%     { opacity: 1; }
  100%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-slideshow-stage img { animation: none; }
  .cs-slideshow-stage img:nth-child(1) { opacity: 1; }
  .cs-slideshow-step .num span,
  .cs-slideshow-caption span { animation: none; }
  .cs-slideshow-step .num span:nth-child(1),
  .cs-slideshow-caption span:nth-child(1) { opacity: 1; }
  .cs-slideshow-dots .pip::after,
  .cs-slideshow-dots .pip::before { animation: none; }
  .cs-slideshow-chrome .live::before { animation: none; }
}

@media (max-width: 640px) {
  .cs-slideshow-chrome { padding: 10px 12px; }
  .cs-slideshow-chrome .dots span { width: 7px; height: 7px; }
  .cs-slideshow-chrome .label { font-size: 10px; }
  .cs-slideshow-chrome .label strong { font-size: 12px; margin-right: 6px; }
  .cs-slideshow-chrome .live { font-size: 9px; }
  .cs-slideshow-foot {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px;
    text-align: center;
  }
  .cs-slideshow-step, .cs-slideshow-dots { justify-self: center; }
  .cs-slideshow-caption { font-size: 12px; height: auto; min-height: 2.6em; }
  .cs-slideshow-caption span { position: static; }
  .cs-slideshow-caption span:not(:nth-child(1)) { display: none; }
}

/* ─────── inline video frame ─────── */
.cs-video {
  position: relative;
  margin-top: 36px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper-3);
  box-shadow: 0 30px 80px -40px rgba(20,20,15,0.32), 0 1px 0 rgba(255,255,255,0.5) inset;
  border: 1px solid var(--hairline);
  isolation: isolate;
}
.cs-video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.cs-video::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.cs-video-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  background: rgba(20, 20, 15, 0.62);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.12);
}
.cs-video-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: cs-video-pulse 1.6s ease-out infinite;
}
@keyframes cs-video-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  100% { box-shadow: 0 0 0 8px transparent; }
}
.cs-video-caption {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cs-video-caption .cs-video-caption-meta { color: var(--ink-4); }

@media (prefers-reduced-motion: reduce) {
  .cs-video-badge::before { animation: none; }
}
@media (max-width: 640px) {
  .cs-video { margin-top: 28px; }
  .cs-video-badge { top: 10px; left: 10px; padding: 6px 10px 6px 9px; font-size: 10px; }
  .cs-video-caption { flex-direction: column; gap: 4px; font-size: 10.5px; }
}

/* ─────── download card (PDF report) ─────── */
.cs-download {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: center;
  margin-top: 48px;
  padding: 32px;
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}
.cs-download::before {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 60%; height: 180%;
  background: radial-gradient(ellipse at center, color-mix(in oklab, var(--accent) 8%, transparent), transparent 65%);
  pointer-events: none;
}
.cs-download-cover {
  position: relative;
  z-index: 1;
  aspect-ratio: 637 / 884;
  background: var(--paper);
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 4px 14px rgba(20,20,15,0.08),
    0 30px 50px -25px rgba(20,20,15,0.35);
  transform: rotate(-2deg);
  transition: transform 0.4s cubic-bezier(0.2, 0.6, 0.2, 1);
  overflow: hidden;
}
.cs-download:hover .cs-download-cover { transform: rotate(-2deg) translateY(-3px) scale(1.02); }
.cs-download-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cs-download-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 40%);
}

.cs-download-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cs-download-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cs-download-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.cs-download h3 {
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  font-weight: 400;
  color: var(--ink);
  text-wrap: pretty;
  max-width: 30ch;
}
.cs-download h3 em { font-style: italic; color: var(--accent); }
.cs-download-desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 52ch;
  margin: 0;
}

.cs-download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.cs-download-meta span { display: inline-flex; align-items: center; gap: 6px; }
.cs-download-meta span + span::before {
  content: '';
  width: 3px; height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.cs-download-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.cs-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid var(--ink);
  transition: transform 0.2s ease, background 0.2s ease;
}
.cs-download-btn:hover { transform: translateY(-1px); background: var(--ink-2); }
.cs-download-btn svg {
  width: 14px; height: 14px;
  transition: transform 0.2s ease;
}
.cs-download-btn:hover svg { transform: translateY(2px); }

.cs-download-btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline-strong);
}
.cs-download-btn-ghost:hover { background: var(--paper); border-color: var(--ink); }

@media (max-width: 720px) {
  .cs-download {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
    margin-top: 36px;
  }
  .cs-download-cover {
    max-width: 200px;
    margin: 0 auto;
    transform: none;
  }
  .cs-download:hover .cs-download-cover { transform: translateY(-2px); }
  .cs-download h3 { font-size: 22px; }
  .cs-download-actions { flex-direction: column; align-items: stretch; }
  .cs-download-btn { justify-content: center; }
}

@media (hover: none) {
  .cs-download:hover .cs-download-cover { transform: rotate(-2deg); }
  .cs-download-btn:hover { transform: none; background: var(--ink); }
}

/* ─────── small util ─────── */
.divider { height: 1px; background: var(--hairline); margin: 0 var(--gutter); max-width: var(--max); }
.divider-full { height: 1px; background: var(--hairline); }

/* ─────── reveal-on-scroll (only when JS-enabled) ─────── */
html.has-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
html.has-reveal .reveal.in { opacity: 1; transform: translateY(0); }
html.has-reveal .reveal-stagger > * { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s ease; }
html.has-reveal .reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .24s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .32s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .40s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: .48s; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body { -webkit-tap-highlight-color: transparent; }
input, textarea, select { font-size: 16px; }

.cs-header-inner {
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

@media (max-width: 900px) {
  .cs-section { grid-template-columns: 1fr; gap: 24px; padding: 60px var(--gutter); }
  .cs-section-label { position: static; }
  .cs-hero-meta { grid-template-columns: repeat(2, 1fr); }
  .cs-hero-meta > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid > div:nth-child(2) { border-right: 0; }
  .cs-pager { grid-template-columns: 1fr; }
}

/* Phone */
@media (max-width: 640px) {
  .cs-nav a:not(.pill) { display: none; }
  .cs-nav .pill { padding: 10px 16px; font-size: 12px; }
  .cs-header-inner { padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: 12px; }
  .cs-logo-mark { height: 20px; }

  .index-hero { padding-top: 64px; padding-bottom: 40px; }
  .case-grid { grid-template-columns: 1fr; padding-bottom: 64px; gap: 16px; }
  .case-card { padding: 24px; min-height: auto; }
  .case-card h3 { font-size: 24px; padding-right: 36px; }
  .case-card .stat .num { font-size: 30px; }
  .case-card:hover { transform: none; }
  .case-card .arrow { bottom: 22px; right: 22px; }

  .cs-hero { padding: 36px var(--gutter); }
  .cs-hero h1 { font-size: clamp(36px, 9vw, 56px); margin: 16px 0 24px; }
  .cs-hero-lede { font-size: 18px; margin-bottom: 32px; }
  .cs-hero-meta { grid-template-columns: 1fr 1fr; gap: 12px 0; padding: 16px 0; }
  .cs-hero-meta > div { padding: 8px 16px; border-left: 1px solid var(--hairline); }
  .cs-hero-meta > div:nth-child(odd) { border-left: 0; padding-left: 0; }

  .cs-section { padding: 48px var(--gutter); }
  .cs-section h2 { font-size: clamp(28px, 7.5vw, 40px); margin-bottom: 20px; }
  .cs-section .body { font-size: 16px; }
  .feature-list li { grid-template-columns: 36px 1fr; gap: 16px; padding: 18px 0; }
  .feature-list li .title { font-size: 19px; }

  .kpi-band { padding: 56px var(--gutter); margin: 48px 0; }
  .kpi-band h3 { margin-bottom: 36px; font-size: clamp(26px, 7vw, 36px); }
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-grid > div { padding: 24px 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.15); }
  .kpi-grid > div:last-child { border-bottom: 0; }
  .kpi-grid .num { font-size: 56px; margin-bottom: 8px; }

  .cs-footer { padding: 48px var(--gutter) calc(48px + env(safe-area-inset-bottom)); }
  .cs-pager a { padding: 22px; }
  .cs-pager h4 { font-size: 18px; }
  .cs-foot-base { flex-direction: column; gap: 8px; align-items: flex-start; }
}

@media (hover: none) {
  .case-card:hover { transform: none; border-color: var(--hairline); }
  .case-card:hover::after { height: 0; }
  .cs-pager a:hover { transform: none; }
}
