/* Dia-style case-study layer, shared by every case study (loads after /cs/style.css and /v/dia.css).
   Pages opt in with <html data-theme="light" data-play-enter="0.2" data-car-noloop>. */
:root { --bg: #fbfaf6; --fade: 251,250,246; --card: #fff; --compare: #fff; --ink: #111; --ink-strong: #111; --body: rgba(0,0,0,.62); --col: 1000px; }
html { scroll-padding-top: 96px; -webkit-font-smoothing: antialiased; overflow-x: clip; }
.also { overflow-x: clip; overflow-y: visible; margin: 0 calc((100vw - min(var(--col), 100vw - 40px)) / -2); padding-left: calc((100vw - min(var(--col), 100vw - 40px)) / 2); padding-right: calc((100vw - min(var(--col), 100vw - 40px)) / 2); }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); overflow-x: hidden; }
.side { display: none; }
.page { width: min(var(--col), 100% - 40px); padding: 0 0 60px; }

/* hero: spaced label, big title, centred deck, animation on a painted card */
.hero { text-align: center; padding: 150px 0 60px; }
.hero h1 { font: 600 clamp(52px, 8.4vw, 118px)/.95 var(--sans); letter-spacing: -.05em; color: var(--ink); margin: 30px 0 0; text-wrap: balance; }
.hero .deck { margin: 36px auto 0; max-width: 640px; font-size: clamp(19px, 1.9vw, 26px); line-height: 1.5; letter-spacing: -.01em; text-wrap: balance; }
.stage { position: relative; margin-top: 72px; border-radius: 30px; overflow: hidden; padding: 6% 7%; }
.stage .anim { border-radius: 16px; box-shadow: 0 30px 60px rgba(0,0,0,.22); }

/* section heads */
.section { padding: 70px 0; margin-top: 0; }
.eyebrow { font: 500 13px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; opacity: 1; color: var(--ink-2); margin-bottom: 22px; }
h2 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.1; font-weight: 600; letter-spacing: -.035em; color: var(--ink); margin-bottom: 28px; }
h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 500; letter-spacing: -.025em; color: var(--ink); }
.body { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; letter-spacing: -.005em; }
figcaption { font-size: 16px; line-height: 1.5; }
figcaption strong { font-weight: 500; letter-spacing: -.01em; }
.block { margin-top: 130px; }
.anim { border-radius: 22px; }

/* problem / solution: calm two-column rows, no coloured panels */
.ps + .ps { margin-top: 116px; }
.ps-cols { gap: 40px; margin: 8px 0 32px; }
.problem, .solution { background: none; border-radius: 0; padding: 0; color: var(--ink); }
.ps h4 { font: 500 12px/1.4 var(--sans); letter-spacing: .2em; color: var(--ink-2); margin-bottom: 10px; }
.problem p, .solution p { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; letter-spacing: -.005em; }
.solution h4::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2c6b1f; margin-right: 8px; vertical-align: 1px; }
.problem h4::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #c03a24; margin-right: 8px; vertical-align: 1px; }

/* impact numbers */
.stats { gap: 40px; }
.stats > div { padding-top: 6px; }
.stats strong { font-size: clamp(44px, 5vw, 68px); font-weight: 500; letter-spacing: -.045em; color: var(--ink); }
.stats > div > span { font-size: 16px; color: var(--ink-2); }

/* carousels, Dia "Past issues" style, no loop: slide 1 lines up with the heading, slides run past the right edge,
   every slide stays sharp with its caption, round arrows sit top right beside the heading */
.carousel::after { display: none; }
/* --gut: distance from the screen edge to the text column (px, so scroll-padding doesn't read % off the track) */
.carousel { --gut: calc((100vw - min(var(--col), 100vw - 40px)) / 2); }
.car-track { margin: 0 calc(var(--gut) * -1); padding-left: var(--gut); padding-right: calc(100vw - var(--gut) - var(--slide-w, 88%)); overscroll-behavior-x: contain; scroll-padding-left: var(--gut); }
.car-track > figure { padding-right: 28px; }
.car-track > figure:not(.is-active) .anim canvas, .car-track > figure:not(.is-active) .anim > .smv-embed { filter: none; transform: none; }
.car-track > figure:not(.is-active) figcaption { opacity: 1; }
.car-track .anim { border-radius: 28px; }
.car-track figcaption { margin-top: 26px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--ink); letter-spacing: -.01em; }
.car-ctrl { top: -69px; gap: 12px; } /* centred on the h3 above (24px gap + half its line) */
h3 + .carousel .car-ctrl { top: -69px; }
.body:has(+ .carousel) { max-width: calc(100% - 150px); } /* leave room for the chevrons on the right */
.body + .carousel { margin-top: 84px; } /* room for the arrows between the paragraph and the slides */
.body + .carousel .car-ctrl { top: -66px; }
.car-btn:disabled { opacity: .35; cursor: default; }
.car-btn:disabled:active { transform: none; }
.car-count { display: none; }
.car-btn { width: 52px; height: 52px; border: 0; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.1); transition: transform .16s var(--out), background .2s; }
.car-btn svg { width: 18px; height: 18px; }
.car-btn:hover { background: #fff; color: var(--ink); border: 0; }
.car-btn:active { transform: scale(.94); }

/* blog card, comparison table, checklist */
.blog { border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.blog:hover { background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.1), 0 14px 34px rgba(0,0,0,.07); }
.blog p { color: var(--ink); letter-spacing: -.02em; }
.blog img { animation: float 3.6s cubic-bezier(.37,0,.63,1) infinite alternate; } /* gentle sine-like ease, 20% quicker */
@keyframes float { from { translate: 0 0; } to { translate: 0 -6px; } }
@media (prefers-reduced-motion: reduce) { .blog img { animation: none; } }
.compare { border-radius: 22px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); padding: 26px 30px 22px; }
.compare [role="columnheader"] { font-weight: 500; }
.checks li { font-size: 18px; color: var(--ink); }

/* marquee pills */
.pill { background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.07); }

/* "You may also like": the next case study on a tilted painted band, its image sliding in from the side */
.also { padding-top: 90px; padding-bottom: 60px; }
.also h2 { margin-bottom: 48px; font-size: 38px; line-height: 1.15; }
.next-card { display: block; color: inherit; text-decoration: none; }
.next-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 56px; align-items: center; }
.print { position: relative; margin-right: calc((100vw - min(var(--col), 100vw - 40px)) / -2 - 40px); background: #fff; padding: 16px; transform: rotate(2.2deg); transform-origin: left center; box-shadow: 0 50px 70px -30px rgba(0,0,0,.3), 0 0 0 1px rgba(0,0,0,.04); transition: transform .45s var(--out); }
.print .in { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.print img, .print video, .print iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.print .in { background: #ededea; }
.print iframe, .print video { pointer-events: none; } /* clicks pass through to the card link */
.print .in .anim { position: absolute; left: 50%; top: 50%; width: 76%; transform: translate(-50%, -50%); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.2); }
.print .in.pad img { object-fit: contain; inset: 8% 0; height: 84%; }
.print .soon { position: absolute; left: 24px; bottom: 20px; background: rgba(255,255,255,.92); border-radius: 999px; padding: 8px 14px; font-size: 13px; color: var(--ink-2); }
.next-text { display: grid; gap: 34px; }
.next-text h3 { margin: 0; display: flex; align-items: center; gap: 12px; }
.next-text h3 svg { width: 24px; height: 24px; transition: transform .25s var(--out); }
.next-text p { margin-top: 10px; color: var(--ink-2); font-size: 18px; max-width: 560px; }
.next-text .impact { text-align: left; }
.next-text .impact b { display: block; font: 500 clamp(18px, 1.7vw, 22px)/1.2 var(--sans); letter-spacing: -.02em; } /* smaller than the h3 above it */
.next-text .impact span { display: block; margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.next-card:active .print { transform: rotate(2.2deg) scale(.99); }
@media (hover:hover) and (pointer:fine) {
  .next-card:hover .print { transform: rotate(1deg) translateX(-24px); }
  .next-card:hover .next-text h3 svg { transform: translateX(4px); }
}

@media (max-width: 640px) {
  .section { padding: 44px 0; }
  .body:has(+ .carousel) { max-width: none; }
  .hero { padding-top: 110px; }
  .car-ctrl { top: auto; }
  .car-track > figure { padding-right: 14px; }
  .next-card { grid-template-columns: 1fr; gap: 40px; }
  .print { margin-right: -10px; padding: 10px; }
  .stage { margin-top: 48px; border-radius: 22px; }
  .ps-cols { gap: 24px; }
  .stats { gap: 24px; }
}
