/*
 * © 2026 Code Precision. All rights reserved.
 * Copying, redistribution, modification, extraction, or reuse of this Code Precision-authored file,
 * in whole or substantial part, is prohibited without prior express written permission from Code Precision.
 * No permission is granted for AI/ML training, fine-tuning, dataset creation, text/data mining,
 * embedding/index construction for generative systems, synthetic-data generation, or image-model training.
 * NoAI · NoAIImage · NoMLTraining
 */
/*
AUTHORSHIP NOTE
Purpose: case overlay and case-story presentation, including the diagonal 2x2 intro reveal, popup-owned scrolling, themed scrollbars, and per-brand case layouts.
Craft signal: client work keeps its own visual identity while the studio controls framing, motion, spacing, media states, popup-owned scrolling, and case-specific scrollbar theming through reusable classes and CSS variables.
*/

/* case-overlay.css — case overlay and case story styles, including popup-owned scroll roots and per-case scrollbar tokens */

/* ==========================================================
   CASE OVERLAY SHELL
   ========================================================== */
.case-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  background: transparent;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-overlay.is-open {
  display: block;
  background: transparent;
  opacity: 1;
  pointer-events: auto;
}

.case-overlay.is-closing {
  display: block;
  opacity: 0;
  pointer-events: none;
}

.case-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  opacity: 1;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.case-overlay__panel {
  --cp-overlay-panel-pad: 18px;
  --cp-overlay-close-offset: 14px;
  --cp-overlay-content-max: 1360px;
  --cp-overlay-close-z: 10030;
  --cp-overlay-close-opacity: 0.92;
  /* Single source of truth for the visible case frame. The scroll viewport
     owns the persistent clip; transient reveal layers reuse the same radius. */
  --cp-case-frame-radius: 34px;
  position: absolute;
  inset: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  padding: var(--cp-overlay-panel-pad);
  box-sizing: border-box;
}

.case-overlay__panel:focus {
  outline: none;
}

/* AUTHORSHIP: vertical scroll belongs to the popup content column, not the document; this keeps the scrollbar anchored to the card edge while local CSS tokens let each case tint its own track/thumb without leaking styles site-wide. */
.case-overlay__content {
  --case-scrollbar-width: 10px;
  /* Keep the native rail inside the rounded frame's tangent band. Because the
     inset derives from the same radius token as the popup, top and bottom stay
     mathematically symmetric when the frame radius changes (including 0 on
     edge-to-edge mobile layouts). */
  --case-scrollbar-edge-inset: calc(var(--cp-case-frame-radius) / 2);
  position: relative;
  width: min(var(--cp-overlay-content-max), 100%);
  max-height: calc(100vh - 76px);
  max-height: calc(100dvh - 76px);
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: var(--cp-case-frame-radius);
  /* The scroll owner includes the native scrollbar gutter while the story
     shell occupies only the scrollport. Paint the gutter from the same frame
     tokens so rounded corners never reveal the panel/backdrop as a grey wedge. */
  background: linear-gradient(
    180deg,
    var(--case-frame-bg-start, rgba(6, 9, 18, 0.92)),
    var(--case-frame-bg-end, rgba(6, 9, 18, 0.92))
  );
  /* The story shell is taller than the visible popup, so its bottom radius is
     not the viewport's bottom radius. Give the scroll owner an explicit paint
     clip instead of relying on border-radius + overflow repaint behaviour.
     This keeps all four popup corners stable from the first composited frame. */
  -webkit-clip-path: inset(0 round var(--cp-case-frame-radius));
  clip-path: inset(0 round var(--cp-case-frame-radius));
  scrollbar-gutter: stable;
  box-sizing: border-box;
}

html.case-overlay-open,
body.case-overlay-open {
  overflow: hidden;
}

/* Input shield: when a case popup owns the screen, the homepage must not receive hover/click events through transparent popup areas. */
html.case-overlay-open #page-main,
body.case-overlay-open #page-main {
  pointer-events: none;
}

html.case-overlay-open .case-overlay,
body.case-overlay-open .case-overlay,
html.case-overlay-open .case-overlay__panel,
body.case-overlay-open .case-overlay__panel,
html.case-overlay-open .case-overlay__backdrop,
body.case-overlay-open .case-overlay__backdrop {
  pointer-events: auto;
}

.case-overlay__shell {
  --case-frame-gap: clamp(16px, 1.45vw, 20px);
  --case-section-pad-y: clamp(36px, 4vw, 54px);
  --case-section-pad-x: clamp(32px, 4vw, 54px);
  --case-grid-gap: clamp(30px, 3.1vw, 46px);
  --case-media-gap: clamp(16px, 1.4vw, 20px);
  --case-small-gap: clamp(10px, 1vw, 14px);
  --case-copy-gap-sm: clamp(14px, 1.15vw, 18px);
  --case-copy-gap-md: clamp(18px, 1.6vw, 24px);
  --case-copy-gap-lg: clamp(24px, 2.2vw, 32px);
  --case-scope-pad-y: clamp(20px, 2vw, 28px);
  position: relative;
  overflow: hidden;
  /* The shell is the long scrolling document, not the viewport frame. Giving
     it its own radius creates a second coloured corner only at scrollTop=0 and
     at the story end. The parent scroll viewport is the sole frame clip. */
  border-radius: 0;
  background: rgba(6, 9, 18, 0.82);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  isolation: isolate;
  transform-style: preserve-3d;
  transition:
    opacity 0.42s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.62s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.case-overlay.is-closing .case-overlay__shell {
  opacity: 0;
  transform: translate3d(0, 18px, 0) scale(0.985);
}


/* AUTHORSHIP: bottom-edge haze for popup-owned scrolling. Keep this as a panel-level overlay, outside .case-overlay__content: sticky placement inside the scroll root pins to the story end on desktop instead of the visible popup edge. */
.case-overlay__scroll-affordance {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 18px;
  z-index: 18;
  width: min(1360px, calc(100% - 36px));
  height: 82px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}

/* AUTHORSHIP: the cue geometry is shared by case popups and Explore; the glassy bottom haze is opt-in so layouts can reuse the same affordance without forcing a blur layer. */
.case-overlay__scroll-affordance:not(.case-overlay__scroll-affordance--blur) .case-overlay__scroll-edge {
  display: none;
}

.case-overlay__scroll-affordance.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}

.case-overlay__scroll-edge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 82px;
  border-radius: 0 0 var(--cp-case-frame-radius) var(--cp-case-frame-radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--case-scroll-hint-edge) 58%, var(--case-scroll-hint-edge) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.75) 44%, rgba(0, 0, 0, 1) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.75) 44%, rgba(0, 0, 0, 1) 100%);
}

.case-overlay__scroll-cue {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--case-scroll-cue-border);
  border-radius: 999px;
  background: var(--case-scroll-cue-bg);
  color: var(--case-scroll-cue-fg);
  box-shadow: 0 8px 24px rgba(4, 10, 24, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-size: var(--text-10);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border-width: 1px;
  border-style: solid;
  text-decoration: none;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.case-overlay__scroll-cue-icon {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: .82;
}


.case-overlay__scroll-cue:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--case-scroll-cue-bg) 78%, rgba(255, 255, 255, 0.22));
  border-color: color-mix(in srgb, var(--case-scroll-cue-border) 72%, rgba(255, 255, 255, 0.22));
}

.case-overlay__scroll-cue:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.case-overlay__scroll-cue:active {
  transform: translateY(0);
}

/* AUTHORSHIP: the 2x2 intro is a framing gesture: it reveals the studio shell, then disappears before competing with client work. */
/* Case resolve transition — image tiles briefly resolve from scattered signal into the active case world.
   Keep this above the Constellation Dial on mobile; the dial sits fixed at high z-index and otherwise can cover the square loader. */
.case-resolve-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  z-index: 10060;
  pointer-events: none;
  overflow: hidden;
  /* The reveal is viewport-sized while .case-overlay__shell is story-sized.
     Give it the same frame radius directly so Final Lock/Tiled Reveal does not
     depend on the parent scroll layer being repainted first. */
  border-radius: var(--cp-case-frame-radius);
  /* The WebGL renderer reuses one promoted canvas between case opens.
     overflow:hidden alone can miss the rounded clip for one compositor frame
     while that canvas changes hosts. Keep the frame radius as an explicit
     compositor clip too, so the first and every subsequent reveal frame use
     exactly the same silhouette as the case viewport. */
  -webkit-clip-path: inset(0 round var(--cp-case-frame-radius));
  clip-path: inset(0 round var(--cp-case-frame-radius));
  background-clip: padding-box;
  isolation: isolate;
  opacity: 1;
  will-change: opacity;
  /* Empty space between incoming tiles belongs to the reveal artwork, not
     to the case frame. Each case authors an independent gradient-capable
     backdrop in case-themes.js; the transparent WebGL canvas and DOM tiles
     share this same host background. */
  background: var(--case-reveal-bg, linear-gradient(180deg, #000000 0%, #000000 100%));
  transition: opacity 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
  contain: layout paint style;
}

/* The active reveal is mounted directly on the dialog panel and aligned to
   the outer border box of .case-overlay__content. It therefore paints over
   the native scrollbar gutter instead of stopping at the scrollport edge. */
.case-resolve-grid--frame-cover {
  box-sizing: border-box;
}

.case-resolve-grid.is-resolved {
  opacity: 0;
}

.case-resolve-final-frame {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  -webkit-clip-path: inherit;
  clip-path: inherit;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  will-change: opacity;
}

/* Final Lock is not merely the last tile target: once the final delayed tile
   has finished, promote the mosaic to one continuous source frame. This keeps
   the capture hold and the production fade mathematically seam-free. */
.case-resolve-grid.is-final-locked .case-resolve-final-frame {
  opacity: 1;
}

/* GPU backend for the authored tiled resolve. The host deliberately keeps the
   exact same background/fade rules as the DOM version; only the tile paint
   surface changes from many elements to one WebGL canvas. */
.case-resolve-grid--shader .case-resolve-shader-canvas {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  -webkit-clip-path: inherit;
  clip-path: inherit;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  pointer-events: none;
}

/* A tiled reveal owns the complete case frame, including its close chrome.
   Use a dedicated lifecycle class rather than `is-interface-ready`: an
   established case keeps the Dial allocated and responsive underneath the
   transition, but the close button must disappear for both first-open and
   inter-case reveals, then return on the exact frame the cover is removed. */
.case-overlay.is-tiled-resolving .case-overlay__close,
.case-overlay.is-resolving .case-overlay__scroll-affordance {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* The real case stays fully laid out and painted underneath the opaque reveal
   from the first frame onward. The former implementation hid the case and also
   switched the scroll root from overflow:hidden back to overflow:auto when the
   reveal node was removed. On mobile that rebuilt the rounded scroll/clip layer
   at exactly the moment the top compositor surface disappeared, which could
   expose the homepage for one frame. Keep the scroll/clip owner unchanged for
   the entire lifecycle; the reveal is now the only layer whose opacity changes. */
.case-overlay.is-resolving .case-overlay__content {
  pointer-events: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

/* The stable scrollbar gutter remains present under the reveal so frame width
   never changes. Only its paint is suppressed while the cover exists. */
.case-overlay.has-resolve-layer .case-overlay__content {
  scrollbar-color: transparent transparent;
}

.case-overlay.has-resolve-layer .case-overlay__content::-webkit-scrollbar {
  width: var(--case-scrollbar-width, 12px);
  height: var(--case-scrollbar-width, 12px);
}

.case-overlay.has-resolve-layer .case-overlay__content::-webkit-scrollbar-track,
.case-overlay.has-resolve-layer .case-overlay__content::-webkit-scrollbar-thumb {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}


.case-resolve-tile {
  position: absolute;
  width: calc(100% / var(--case-resolve-cols));
  height: calc(100% / var(--case-resolve-rows));
  left: calc(var(--case-resolve-col) * 100% / var(--case-resolve-cols));
  top: calc(var(--case-resolve-row) * 100% / var(--case-resolve-rows));
  background-repeat: no-repeat;
  background-size: var(--case-resolve-bg-width) var(--case-resolve-bg-height);
  background-position: 50% 50%;
  opacity: 0.78;
  transform: translate3d(var(--case-resolve-shift-x, 0px), var(--case-resolve-shift-y, 0px), 0) scale(1);
  /* CSS fallback performance: the old per-tile blur/saturate/contrast animation
     was visually negligible (1.2px blur and only 2–8% colour shifts) but forced
     Firefox to run a filter/raster pipeline for every tile on every frame. The
     signal character is carried by fragment permutation, stagger, offsets and
     opacity. Tile scale stays exactly 1 so mobile framing remains the strict
     minimum-cover crop with no hidden zoom reserve. */
  transition:
    background-position 420ms cubic-bezier(0.2, 0.74, 0.18, 1),
    transform 420ms cubic-bezier(0.2, 0.74, 0.18, 1),
    opacity 420ms ease;
  transition-delay: var(--case-resolve-delay, 0ms);
}

/* Tile edges remain image-derived in both renderers. The former CSS ::after
   seam and the matching GPU micro-border were removed: at Final Lock they could
   read as a cross exactly when the image should be fully seamless. */

.case-resolve-grid[data-stage='1'] .case-resolve-tile {
  opacity: 0.86;
  transform: translate3d(calc(var(--case-resolve-shift-x, 0px) * 0.48), calc(var(--case-resolve-shift-y, 0px) * 0.48), 0) scale(1);
}

.case-resolve-grid[data-stage='2'] .case-resolve-tile {
  opacity: 0.92;
  transform: translate3d(calc(var(--case-resolve-shift-x, 0px) * 0.18), calc(var(--case-resolve-shift-y, 0px) * 0.18), 0) scale(1);
}

.case-resolve-grid[data-stage='3'] .case-resolve-tile {
  opacity: 0.96;
  transform: translate3d(0, 0, 0) scale(1);
  transition-duration: 500ms;
}


/* Dev Tiled Reveal Demo changes only the stage schedule in JavaScript. The
   first transition begins immediately (no static chaotic hold), while tile
   transition durations/stagger remain production-identical. */

.case-overlay.is-closing .case-resolve-grid {
  opacity: 0;
  transition-duration: 180ms;
}

@media (prefers-reduced-motion: reduce) {
  /* Reduced-motion opens do not mount a tiled cover, so they use a dedicated
     content-fade state. Normal tiled resolves never alter case-content opacity. */
  .case-overlay.is-content-fading .case-overlay__hero,
  .case-overlay.is-content-fading .case-overlay__body {
    opacity: 0;
  }

  /* interactive-ui.css intentionally collapses transitions globally under
     reduced motion with a high-specificity selector. Re-enable only this
     explicitly requested non-spatial case-content fade. */
  html[data-cp-page][data-cp-page] body .case-overlay__hero,
  html[data-cp-page][data-cp-page] body .case-overlay__body {
    transition: opacity 480ms ease;
  }
}

/* ==========================================================
   CASE HERO
   ========================================================== */
.case-overlay__hero {
  position: relative;
  padding: clamp(40px, 4.1vw, 64px) clamp(28px, 4.2vw, 64px) clamp(36px, 3.4vw, 52px);
}

.case-overlay__studio-logo {
  position: absolute;
  z-index: 2;
  top: clamp(26px, 2.3vw, 34px);
  left: 50%;
  display: flex;
  align-items: center;
  width: fit-content;
  margin: 0;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
}

/* With a client mark present, the separator is pinned to the exact hero
   centreline and the two marks live in equal-width logo zones. Each logo is
   centered independently inside its own zone instead of being edge-aligned to
   the separator. This makes the pair stay mathematically symmetric when the
   client mark changes from very wide (Samsung) to nearly square (Sour Patch)
   while preserving each asset's authored aspect ratio and height limits. */
.case-overlay__studio-logo.has-client-logo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  column-gap: clamp(12px, 1vw, 16px);
  width: min(300px, calc(100% - 56px));
}

.case-overlay__studio-logo.has-client-logo > img:first-child {
  justify-self: center;
}

.case-overlay__studio-logo img {
  display: block;
  width: clamp(112px, 8.4vw, 126px);
  height: auto;
}

/* AUTHORSHIP: optional client (brand) logo shown beside the Code Precision
   mark. When a client mark is present, .has-client-logo switches the masthead
   to a three-column grid whose 1px divider is pinned to the exact hero
   centreline. This keeps the visual axis stable across wide, square and tall
   brand marks. Without a client mark the studio logo keeps its original
   single-logo centering. */
.case-overlay__client-logo-divider {
  display: none;
  width: 1px;
  height: 100%;
  min-height: 32px;
  justify-self: center;
  background: rgba(255, 255, 255, 0.24);
}

.case-overlay__client-logo-divider:not([hidden]) {
  display: block;
}

.case-overlay__client-logo-divider[hidden] {
  display: none !important;
}

/* No backing plate — request was to drop it entirely. No recolor filter
   either: clientLogo.src (js/case-themes.js) already points at a file in its
   final, correct hero color — either a pre-baked mono variant matching
   whichever tone the studio mark uses on that case's hero, or the brand's
   own authored colors for marks that keep them (e.g. SAP's white lettering
   on its own blue badge, which a monochrome filter would have flattened
   into unreadable letterforms). */
.case-overlay__studio-logo img.case-overlay__client-logo {
  display: none;
  width: auto;
  height: auto;
  max-width: clamp(64px, 6vw, 100px);
  max-height: clamp(24px, 2.2vw, 34px);
  object-fit: contain;
}

.case-overlay__studio-logo img.case-overlay__client-logo:not([hidden]) {
  display: block;
}

.case-overlay__studio-logo.has-client-logo img.case-overlay__client-logo:not([hidden]) {
  justify-self: center;
}


.case-overlay__client-logo[hidden] {
  display: none !important;
}

/* Sour Patch Kids is close to square, unlike the mostly horizontal client
   marks. Give it a slightly taller bounded slot so the lettering stays
   readable without allowing it to approach the studio-logo height. */
.case-overlay[data-case="sour-patch-catch"] .case-overlay__studio-logo img.case-overlay__client-logo {
  max-width: 46px;
  max-height: 46px;
}

.case-overlay__brand {
  margin-bottom: clamp(10px, 0.9vw, 14px);
  font-size: var(--text-flow-sm);
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.72;
}

.case-overlay__title {
  margin: 0;
  font-weight: 600;
  font-size: var(--text-flow-hero);
  line-height: 1;
  letter-spacing: -0.04em;
}

.case-overlay__summary {
  max-width: 980px;
  margin: clamp(16px, 1.5vw, 22px) 0 0 0;
  font-size: var(--text-flow-3xl);
  line-height: 1.6;
  letter-spacing: -0.015em;
}

.case-overlay__tags {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 1vw, 14px);
  margin-top: clamp(22px, 2vw, 30px);
}

.case-overlay__tags span {
  display: inline-flex;
  align-items: center;
  min-height: clamp(36px, 3.2vw, 42px);
  padding: 0.55em 1.15em;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: var(--text-flow-md);
  line-height: 1.2;
}

/* Case-to-case navigation — lightweight dialog chrome that stays readable across dark and light case themes. */
.case-overlay__hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(18px, 2.4vw, 34px);
  margin-bottom: clamp(12px, 1vw, 16px);
  padding-right: clamp(44px, 4vw, 62px);
}

.case-overlay__hero-head .case-overlay__brand {
  margin: 0;
  padding-top: 0.58em;
}

.case-overlay__case-nav {
  --case-nav-link-bg: var(--case-scroll-cue-bg);
  --case-nav-link-border: var(--case-scroll-cue-border);
  --case-nav-link-fg: var(--case-scroll-cue-fg);
  --case-nav-link-muted: color-mix(in srgb, var(--case-nav-link-fg) 68%, transparent);
  display: flex;
  align-items: stretch;
  gap: 10px;
  color: var(--case-nav-link-fg);
}

.case-overlay__case-nav--top {
  display: none !important;
  flex: 0 1 560px;
  justify-content: flex-end;
  margin-left: auto;
}

.case-overlay__case-nav--bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--case-small-gap, 14px);
  margin-top: var(--case-frame-gap, 20px);
  padding: clamp(14px, 1.6vw, 20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.06), transparent 48%),
    rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Constellation Dial replaces the visible Previous/Next controls.
   The nav links stay in the DOM for keyboard/programmatic transition logic,
   but they are no longer presented in the popup UI. */
.case-overlay__case-nav--top,
.case-overlay__case-nav--bottom {
  display: none !important;
}

.case-overlay__case-nav-link {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--case-nav-link-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  background: color-mix(in srgb, var(--case-nav-link-bg) 82%, transparent);
  color: var(--case-nav-link-fg);
  font: inherit;
  line-height: 1;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.case-overlay__case-nav--top .case-overlay__case-nav-link {
  max-width: min(250px, 24vw);
}

.case-overlay__case-nav--bottom .case-overlay__case-nav-link {
  width: 100%;
  min-height: clamp(66px, 5.6vw, 82px);
  padding: clamp(12px, 1.2vw, 16px) clamp(14px, 1.6vw, 22px);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  background: color-mix(in srgb, var(--case-nav-link-bg) 58%, rgba(255, 255, 255, 0.035));
}

.case-overlay__case-nav-link--next {
  justify-content: flex-end;
  text-align: right;
}

.case-overlay__case-nav-link--next .case-overlay__case-nav-copy {
  align-items: flex-end;
}

.case-overlay__case-nav-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.16);
  background: color-mix(in srgb, var(--case-nav-link-bg) 70%, rgba(255, 255, 255, 0.18));
  border-color: color-mix(in srgb, var(--case-nav-link-border) 70%, rgba(255, 255, 255, 0.35));
  box-shadow: 0 10px 24px rgba(3, 8, 18, 0.10);
}

.case-overlay__case-nav-link:active {
  transform: translateY(0);
}

.case-overlay__case-nav-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.case-overlay__case-nav-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.case-overlay__case-nav-label {
  color: var(--case-nav-link-muted);
  font-size: var(--text-flow-xs);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.case-overlay__case-nav-title {
  overflow: hidden;
  color: var(--case-nav-link-fg);
  font-size: var(--text-flow-sm);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-overlay__case-nav--bottom .case-overlay__case-nav-title {
  font-size: var(--text-flow-xl);
  line-height: 1.1;
}

.case-overlay__case-nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--case-nav-link-fg);
  font-size: var(--text-16);
  line-height: 1;
  opacity: 0.78;
}

.case-overlay__case-nav-arrow--prev::before {
  content: '←';
  transform: translateY(-1px);
}

.case-overlay__case-nav-arrow--next::before {
  content: '→';
  transform: translateY(-1px);
}

/* Case hero gradients, text overrides and tag accent colors are generated from
   js/case-themes.js. Generic hero layout stays here; case palette data
   should not be hand-copied into CSS. */

/* ==========================================================
   CASE STORY BASE
   ========================================================== */
.case-overlay__body {
  --case-frame-gap: clamp(16px, 1.45vw, 20px);
  --case-section-pad-y: clamp(36px, 4vw, 54px);
  --case-section-pad-x: clamp(32px, 4vw, 54px);
  --case-grid-gap: clamp(30px, 3.1vw, 46px);
  --case-media-gap: clamp(16px, 1.4vw, 20px);
  --case-small-gap: clamp(10px, 1vw, 14px);
  --case-copy-gap-sm: clamp(14px, 1.15vw, 18px);
  --case-copy-gap-md: clamp(18px, 1.6vw, 24px);
  --case-copy-gap-lg: clamp(24px, 2.2vw, 32px);
  --case-scope-pad-y: clamp(20px, 2vw, 28px);
  position: relative;
  padding: var(--case-frame-gap);
  background: linear-gradient(180deg, var(--case-frame-bg-start), var(--case-frame-bg-end));
  box-shadow:
    inset 0 1px 0 var(--case-frame-accent),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

/* Case body background is intentionally static; resolve/cube effects are handled by their own layers. */
/* Case content */
.case-overlay__body > * {
  position: relative;
  z-index: 1;
}

/* Per-case frame and scrollbar colors are generated at runtime from
   js/case-themes.js into <style id="case-theme-registry-generated">.
   Edit case palette data there, not here. */

.case-story {
  display: grid;
  gap: var(--case-frame-gap);
}

.case-story__section {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: var(--case-section-pad-y) var(--case-section-pad-x);
  color: #fff;
  background: linear-gradient(180deg, rgba(22, 25, 45, .98), rgba(10, 12, 24, .98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.case-story__section--light {
  color: #111126;
  box-shadow: inset 0 0 0 1px rgba(23, 18, 61, 0.08);
}

.case-story__section--green {
  background: linear-gradient(180deg, rgba(72, 92, 56, .98), rgba(43, 55, 34, .98));
}

/* Spin a Ball keeps a dark arena base: clean navy/black instead of any
   brown, rust, or green-orange mix. */
.case-story__section--arena {
  background:
    radial-gradient(circle at 78% 12%, rgba(255, 176, 32, .105), transparent 24%),
    radial-gradient(circle at 16% 82%, rgba(255, 45, 61, .13), transparent 34%),
    linear-gradient(90deg, rgba(7, 16, 25, .99) 0%, rgba(11, 22, 35, .99) 56%, rgba(5, 10, 18, .99) 100%);
}

.case-story__section--space {
  background:
    radial-gradient(circle at top left, rgba(90, 121, 255, .24), transparent 26%),
    linear-gradient(180deg, rgba(8, 15, 44, .98), rgba(10, 14, 30, .98));
}

.case-story__section--nfl {
  background:
    radial-gradient(circle at top right, rgba(150, 198, 255, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(9, 30, 76, .98), rgba(8, 21, 54, .98));
}

.case-story__section--asphalt {
  background:
    radial-gradient(circle at top right, rgba(246, 204, 25, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(63, 63, 72, .98), rgba(32, 33, 41, .98));
}

.case-story__section--candy {
  background: linear-gradient(180deg, rgba(231, 195, 244, .98), rgba(217, 174, 236, .98));
  color: #1d1730;
}

.case-story__section--benefit {
  background: linear-gradient(180deg, rgba(251, 111, 145, .98), rgba(244, 114, 154, .98));
  color: #1d0611;
}

.case-story__section::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, .14), transparent 28%);
}

/* Case popup rhythm — align copy to the top edge of the media
   and keep recurring spacing in reusable classes instead of inline styles. */
/* AUTHORSHIP: story grids align copy and media rhythm so each popup feels curated, not just templated. */
.case-story__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, .98fr);
  column-gap: var(--case-grid-gap);
  row-gap: var(--case-copy-gap-lg);
  align-items: start;
}

.case-story__copy {
  max-width: 700px;
  min-width: 0;
}

.case-story__copy > :first-child {
  margin-top: 0;
}

.case-story__copy > :last-child {
  margin-bottom: 0;
}

.case-story__heading {
  margin: 0 0 var(--case-copy-gap-md) 0;
  font-size: var(--text-flow-display);
  line-height: 1.14;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.case-story__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--case-copy-gap-sm);
  font-size: var(--text-14);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: .72;
}

.case-story__copy p {
  margin: 0;
  font-size: var(--text-flow-lg);
  line-height: 1.6;
}

.case-story__copy p + p {
  margin-top: var(--case-copy-gap-sm);
}

.case-story__rule {
  width: 2px;
  min-height: 110px;
  margin-right: 0;
  border-radius: 999px;
  background: currentColor;
  opacity: .24;
}

.case-story__lead {
  display: flex;
  align-items: stretch;
  gap: var(--case-copy-gap-sm);
}

.case-story__lead-carousel {
  min-width: 0;
}

.case-story__lead-carousel-controls {
  display: none;
}

.case-story__followup {
  margin-top: var(--case-copy-gap-md);
}

.case-story__icon-list + .case-story__followup {
  margin-top: clamp(26px, 2.4vw, 34px);
}

.case-story__media {
  position: relative;
  z-index: 1;
}

.case-story__media-stack {
  display: grid;
  gap: var(--case-media-gap);
}

.case-story__card,
.case-story__screen,
.case-story__device,
.case-story__poster {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255, 255, 255, .08);
  box-shadow: none;
}

.case-story__section--light .case-story__card,
.case-story__section--benefit .case-story__card,
.case-story__section--candy .case-story__card,
.case-story__section--light .case-story__screen,
.case-story__section--benefit .case-story__screen,
.case-story__section--candy .case-story__screen,
.case-story__section--light .case-story__device,
.case-story__section--benefit .case-story__device,
.case-story__section--candy .case-story__device {
  background: rgba(255, 255, 255, .42);
}

.case-story--nfl-scan-a-helmet .case-story__section--nfl:nth-of-type(2) .case-story__card {
  border-radius: 12px;
}

.case-story__card img,
.case-story__screen img,
.case-story__device img,
.case-story__poster img,
.case-story__device video {
  display: block;
  width: 100%;
  height: auto;
}

.case-story__device {
  padding: 16px;
}

.case-story__device--tall {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.case-story__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--case-media-gap);
}

/* Single-item media rows let one landscape asset use the full media column instead of sitting in just one half of the 2-up grid. */

.case-story__badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  min-height: 56px;
  box-sizing: border-box;
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
  color: #151b46;
  font-weight: 500;
}

.case-story__badge img {
  width: auto;
  max-height: 26px;
}

/* Shared compact brand pill: auto-width, consistent height, no JS sizing. */
.case-story__badge--brand-pill {
  --case-brand-pill-height: 56px;
  height: var(--case-brand-pill-height);
  min-height: var(--case-brand-pill-height);
  width: fit-content;
  max-width: 100%;
  gap: 14px;
  padding: 0 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
  color: #151b46;
  font-size: var(--text-flow-md);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0;
  box-sizing: border-box;
}

.case-story__badge--brand-pill img {
  display: block;
  width: auto;
  max-height: 26px;
}

.case-story__badge--brand-pill span {
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
}

.case-story--spin-a-ball .case-story__brandline--spin-event {
  display: grid;
  grid-template-columns: minmax(176px, 224px) minmax(244px, 260px);
  align-items: stretch;
  gap: 12px;
  width: min(100%, 496px);
}

.case-story--spin-a-ball .case-story__brandline--spin-event .case-story__badge--brand-pill {
  --case-brand-pill-height: 62px;
  width: 100%;
  gap: 8px;
  padding: 0 14px;
  border-radius: 16px;
  justify-content: center;
  font-size: var(--text-flow-sm);
  white-space: nowrap;
}

.case-story--spin-a-ball .case-story__badge--brand-pill img[alt="Samsung"] {
  max-height: 14px;
}

.case-story--spin-a-ball .case-story__event-card {
  min-width: 0;
  min-height: 62px;
  display: grid;
  grid-template-columns: 134px minmax(0, 1fr);
  align-items: center;
  padding: 9px 14px;
  box-sizing: border-box;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(240, 246, 251, .94));
  box-shadow:
    0 12px 26px rgba(0, 0, 0, .16),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  color: #071019;
}

.case-story--spin-a-ball .case-story__event-logos {
  width: 134px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-right: 8px;
  box-sizing: border-box;
}

.case-story--spin-a-ball .case-story__event-logo {
  flex: 0 0 auto;
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
}

.case-story--spin-a-ball .case-story__event-logo--tiaa {
  max-width: 52px;
  max-height: 18px;
}

.case-story--spin-a-ball .case-story__event-logo--big-ten {
  max-width: 58px;
  max-height: 23px;
}

.case-story--spin-a-ball .case-story__event-logo-divider {
  flex: 0 0 1px;
  align-self: stretch;
  max-height: 28px;
  margin-block: auto;
  background: rgba(7, 16, 25, .16);
}

.case-story--spin-a-ball .case-story__event-name {
  min-width: 0;
  padding-left: 12px;
  border-left: 1px solid rgba(7, 16, 25, .12);
  font-family: var(--font);
  font-size: clamp(9px, .68rem, 11px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
  text-wrap: balance;
}

.case-story__badge--logo-only {
  gap: 0;
  justify-content: center;
  padding: 12px 16px;
}

.case-story__badge--logo-only img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 24px;
}

.case-story__icon-list {
  display: grid;
  gap: var(--case-small-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-story__icon-list li {
  display: flex;
  align-items: center;
  gap: var(--case-small-gap);
  font-size: var(--text-flow-md);
  line-height: 1.5;
}

.case-story__icon-list img {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
}

.case-story__section--benefit .case-story__icon-list img,
.case-story__section--candy .case-story__icon-list img {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.case-story__icon-list--spacecraft img,
.case-story__icon-list--benefit img,
.case-story__icon-list--watchers img {
  flex-basis: 50px;
  width: 50px;
  height: 50px;
  padding: 10px;
  box-sizing: border-box;
  object-fit: contain;
}

.case-story__icon-list--benefit img {
  background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 767px) {
  .case-story__icon-list--spacecraft img,
  .case-story__icon-list--benefit img,
  .case-story__icon-list--watchers img {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
    padding: 9px;
  }
}

.case-story__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--case-small-gap);
  margin-top: var(--case-copy-gap-lg);
}

.case-story__stat {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  background: rgba(255, 255, 255, .1);
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: break-word;
}

.case-story__section--benefit .case-story__stat,
.case-story__section--candy .case-story__stat {
  background: rgba(255, 255, 255, .45);
  border-color: rgba(18, 12, 45, .08);
}

.case-story__stat strong {
  display: block;
  margin-bottom: 6px;
  font-size: var(--text-24);
  line-height: 1;
  letter-spacing: -0.015em;
}

.case-story__gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--case-media-gap);
}

.case-story__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .2);
  transform: translate(-50%, -50%);
}

.case-story__play::before {
  content: '';
  margin-left: 4px;
  border-left: 18px solid #12153f;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

.case-story__brandline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--case-media-gap);
  margin-top: var(--case-copy-gap-lg);
}

.case-story__bg-art {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  opacity: .8;
  pointer-events: none;
}

.case-story__cta-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--case-copy-gap-lg);
}

.case-story__authenticity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  max-width: calc(100% - 16px);
  margin: var(--case-copy-gap-lg) auto var(--case-copy-gap-md);
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(7, 10, 20, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.86);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: var(--text-12);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-align: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.case-story__authenticity[hidden] {
  display: none !important;
}

.case-story__authenticity-marker {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.075);
  opacity: 0.88;
}

.case-story__authenticity-text {
  min-width: 0;
}

/* ==========================================================
   BENEFIT DEVICE VIDEO
   ========================================================== */
.case-story__device-girl {
  position: relative;
  overflow: hidden;
  padding: 0;
  backface-visibility: hidden;
}

.case-story__device-girl::before {
  content: '';
  display: block;
  aspect-ratio: 520 / 922;
  width: 100%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.08);
}

.case-story .case-story__device-girl video,
.case-story__device-girl video {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  transform: none;
}



/* ==========================================================
   INLINE PLAYABLE MEDIA
   Playable case cards keep the poster, overlay, video layer and controls
   inside the same rounded media frame. The generic rule sets the shared
   structure; brand-specific modifiers tune Plyr colours and button treatment.
   ========================================================== */
.case-story__card--playable {
  aspect-ratio: 16 / 9;
}

.case-story__card--playable .case-story__play-media {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 52%, rgba(61, 183, 255, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(6, 12, 33, 0.08), rgba(6, 12, 33, 0.34));
}

.case-story__card--playable .case-story__play-poster,
.case-story__card--playable .case-story__play-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-story__card--playable .case-story__play-poster {
  z-index: 1;
  transition: opacity 0.38s ease, transform 0.55s cubic-bezier(.22, .61, .36, 1), filter 0.38s ease;
}

.case-story__card--playable::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(circle at 50% 50%, rgba(3, 9, 30, 0.14), rgba(3, 9, 30, 0.48) 62%, rgba(3, 9, 30, 0.72) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
  pointer-events: none;
  transition: opacity 0.32s ease;
}

.case-story__card--playable .case-story__play-video {
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  background: #020611;
  transition: opacity 0.28s ease;
}

.case-story__play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(78px, 8vw, 104px);
  height: clamp(78px, 8vw, 104px);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(12, 21, 58, 0.76), rgba(6, 12, 33, 0.9));
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34), 0 0 0 8px rgba(104, 187, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}

.case-story__play-button::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  background: radial-gradient(circle at 38% 34%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 58%);
  opacity: 0.95;
}

.case-story__play-button:focus-visible {
  outline: 2px solid rgba(148, 215, 255, 0.9);
  outline-offset: 3px;
}

.case-story__play-button-icon {
  position: relative;
  z-index: 1;
  width: clamp(22px, 2.35vw, 30px);
  height: clamp(22px, 2.35vw, 30px);
  margin-left: 4px;
}

.case-story__play-button-icon img {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 12px rgba(115, 200, 255, 0.3));
}

@media (pointer: fine) {
  .case-story__card--playable:hover .case-story__play-button {
    transform: translate(-50%, -50%) scale(1.04);
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.38), 0 0 0 10px rgba(104, 187, 255, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    border-color: rgba(180, 231, 255, 0.45);
  }

  .case-story__card--playable:hover .case-story__play-poster {
    transform: scale(1.015);
    filter: saturate(1.03) contrast(1.02);
  }
}

.case-story__card--playable.is-playing::after,
.case-story__card--playable.is-playing .case-story__play-button {
  opacity: 0;
  pointer-events: none;
}

.case-story__card--playable.is-playing .case-story__play-poster {
  opacity: 0;
  pointer-events: none;
}

.case-story__card--playable.is-playing .case-story__play-video {
  opacity: 1;
  pointer-events: auto;
}

.case-story__card--playable.has-video-error::after {
  opacity: 0.42;
}

.case-story__card--playable.has-video-error .case-story__play-button {
  opacity: 1;
  pointer-events: auto;
}

.case-story__card--playable.has-video-error .case-story__play-video {
  opacity: 0;
  pointer-events: none;
}

.case-story__card--playable.has-video-error .case-story__play-poster {
  opacity: 1;
  pointer-events: auto;
}

.case-story__card--playable-patch {
  aspect-ratio: auto;
}

.case-story__card--playable-patch .case-story__play-media {
  aspect-ratio: 2120 / 1552;
  background: transparent;
}

.case-story__card--playable-patch .case-story__play-poster,
.case-story__card--playable-patch .case-story__play-video {
  object-fit: cover;
}

.case-story__card--playable-patch::after {
  background: none;
  opacity: 0;
}

.case-story__card--playable.case-story__card--playable-patch .case-story__play-poster,
.case-story__card--playable.case-story__card--playable-patch:hover .case-story__play-poster {
  filter: none;
}

.case-story__card--playable-patch .case-story__play-button {
  border-color: rgba(236, 255, 131, 0.26);
  background: linear-gradient(180deg, rgba(94, 30, 120, 0.82), rgba(46, 14, 72, 0.92));
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.34),
    0 0 0 8px rgba(182, 255, 61, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.case-story__card--playable-patch .case-story__play-button::before {
  background: radial-gradient(circle at 38% 34%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 58%);
}

.case-story__card--playable-patch .case-story__play-button:focus-visible {
  outline-color: rgba(220, 255, 120, 0.95);
}

.case-story__card--playable-patch .case-story__play-button-icon img {
  filter:
    brightness(0) saturate(100%) invert(95%) sepia(35%) saturate(1189%) hue-rotate(18deg) brightness(103%) contrast(102%) drop-shadow(0 0 14px rgba(203, 255, 94, 0.28));
}

@media (pointer: fine) {
  .case-story__card--playable-patch:hover .case-story__play-button {
    border-color: rgba(236, 255, 131, 0.42);
    box-shadow:
      0 20px 52px rgba(0, 0, 0, 0.38),
      0 0 0 10px rgba(182, 255, 61, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.20);
  }
}

/* ============================================================
   INLINE VIDEO CONTROLS
   ============================================================ */
.case-story__unmute-button,
.case-story__pause-button,
.case-story__fullscreen-button {
  position: absolute;
  bottom: 16px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(12, 21, 58, 0.72), rgba(6, 12, 33, 0.88));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.30), 0 0 0 5px rgba(104, 187, 255, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.28s ease, transform 0.28s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  pointer-events: none;
}

.case-story__unmute-button::before,
.case-story__pause-button::before,
.case-story__fullscreen-button::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  background: radial-gradient(circle at 38% 34%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 60%);
}

.case-story__unmute-button:focus-visible,
.case-story__pause-button:focus-visible,
.case-story__fullscreen-button:focus-visible {
  outline: 2px solid rgba(148, 215, 255, 0.9);
  outline-offset: 3px;
}

.case-story__unmute-button {
  right: 64px;
}

.case-story__pause-button {
  left: 16px;
}

.case-story__fullscreen-button {
  right: 16px;
}

.case-story__unmute-icon,
.case-story__pause-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.case-story__fullscreen-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.case-story__pause-play,
.case-story__fs-compress {
  display: none;
}

.case-story__pause-button.is-paused .case-story__pause-bars,
.case-story__fullscreen-button.is-fullscreen .case-story__fs-expand,
.case-story__unmute-button.is-unmuted .case-story__mute-cross {
  display: none;
}

.case-story__pause-button.is-paused .case-story__pause-play,
.case-story__fullscreen-button.is-fullscreen .case-story__fs-compress {
  display: block;
}

.case-story__card--playable.is-playing .case-story__unmute-button,
.case-story__card--playable.is-playing .case-story__pause-button,
.case-story__card--playable.is-playing .case-story__fullscreen-button {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (pointer: fine) {
  .case-story__unmute-button:hover,
  .case-story__pause-button:hover,
  .case-story__fullscreen-button:hover {
    border-color: rgba(180, 231, 255, 0.40);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.36), 0 0 0 6px rgba(104, 187, 255, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.20);
    background: linear-gradient(180deg, rgba(18, 32, 80, 0.82), rgba(8, 16, 44, 0.94));
  }
}

.case-story__card--playable-patch .case-story__unmute-button,
.case-story__card--playable-patch .case-story__pause-button,
.case-story__card--playable-patch .case-story__fullscreen-button {
  border-color: rgba(236, 255, 131, 0.22);
  background: linear-gradient(180deg, rgba(94, 30, 120, 0.78), rgba(46, 14, 72, 0.90));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.30), 0 0 0 5px rgba(182, 255, 61, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

@media (pointer: fine) {
  .case-story__card--playable-patch .case-story__unmute-button:hover,
  .case-story__card--playable-patch .case-story__pause-button:hover,
  .case-story__card--playable-patch .case-story__fullscreen-button:hover {
    border-color: rgba(236, 255, 131, 0.40);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.36), 0 0 0 6px rgba(182, 255, 61, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }

  .case-story__card--playable.is-playing:hover .case-story__unmute-button,
  .case-story__card--playable.is-playing:hover .case-story__pause-button,
  .case-story__card--playable.is-playing:hover .case-story__fullscreen-button {
    opacity: 1;
  }
}

.case-story__card--playable.is-playing:not(:hover):not(:focus-within) .case-story__unmute-button,
.case-story__card--playable.is-playing:not(:hover):not(:focus-within) .case-story__pause-button,
.case-story__card--playable.is-playing:not(:hover):not(:focus-within) .case-story__fullscreen-button {
  opacity: 0.45;
}

/* ============================================================
   PLYR THEMED PLAYERS
   ============================================================ */
.case-story__card--plyr-patch,
.case-story__card--plyr-spacecraft,
.case-story__card--plyr-blaney,
.case-story__card--plyr-spin {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  transform-origin: center center;
}

.case-story__card--plyr-patch,
.case-story__card--plyr-spacecraft {
  /* Confirmed 16:9 (Sour Patch Catch, Spacecraft). Reserves layout space
     from first paint, before any JS runs at all — see the note on the bare
     `video` rule below for why the card alone isn't sufficient. */
  aspect-ratio: 16 / 9;
}

.case-story__card--plyr-blaney {
  /* Confirmed 1:1 (Ride with Blaney). */
  aspect-ratio: 1 / 1;
}

/* AUTHORSHIP: the actual cause of the oversized-then-correct flash. Before
   Plyr's JS wraps this <video> in its own .plyr / .plyr__video-wrapper
   structure, the element sits in the DOM as a bare, unstyled <video> — none
   of plyr.min.css applies yet, since every one of its sizing rules
   (`.plyr video{width:100%;height:100%}` etc.) requires that ancestor
   markup to exist. With no width/height attributes and no CSS reaching it,
   the browser renders the raw tag at its native decoded pixel size (easily
   1000px+) for however long it takes JS to run and wrap it — an aspect-
   ratio reservation on the card alone only protects the CARD's box, not
   what paints inside it before Plyr arrives. This rule constrains the bare
   video directly on all four cases — including Spin, whose own portrait
   aspect-ratio (below) has exactly this same gap — independent of Plyr's
   markup or its `ratio` option/JS timing, so there is nothing left
   unconstrained at any point. */
.case-story__card--plyr-patch > video,
.case-story__card--plyr-spacecraft > video,
.case-story__card--plyr-blaney > video,
.case-story__card--plyr-spin > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-story__card--plyr-patch {
  background: #1a0a2e;
}

.case-story--sour-patch-catch .case-story__card--plyr-patch,
.case-story--sour-patch-catch .case-story__card--plyr-patch .plyr,
.case-story--sour-patch-catch .case-story__card--plyr-patch .plyr__video-wrapper,
.case-story--sour-patch-catch .case-story__card--plyr-patch video {
  box-shadow: none;
  filter: none;
}

.case-story__card--plyr-spacecraft {
  background: #060c21;
}

.case-story__card--plyr-blaney {
  background: #202129;
}

.case-story__card--plyr-spin {
  background: #05070d;
}

.case-story__card--plyr-patch .plyr,
.case-story__card--plyr-spacecraft .plyr,
.case-story__card--plyr-blaney .plyr,
.case-story__card--plyr-spin .plyr {
  --plyr-control-icon-size: 16px;
  --plyr-control-spacing: 10px;
  --plyr-font-size-base: 12px;
  --plyr-font-size-small: 11px;
  --plyr-range-thumb-height: 13px;
  --plyr-range-track-height: 3px;
  --plyr-control-radius: 6px;
  width: 100%;
  border-radius: 12px;
}

.case-story__video-unmute-hint {
  position: absolute;
  top: clamp(10px, 1.1vw, 14px);
  right: clamp(10px, 1.1vw, 14px);
  z-index: 8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(8, 12, 24, 0.62);
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--text-11);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-3px);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, visibility 0.2s ease;
}

.case-story__card.has-audio-track:not(.is-audio-unlocked) .case-story__video-unmute-hint,
.case-story__card.has-no-audio-track:not(.is-audio-unlocked) .case-story__video-unmute-hint {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.case-story__video-unmute-hint:hover,
.case-story__video-unmute-hint:focus-visible {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(8, 12, 24, 0.76);
  transform: translateY(-1px);
}

.case-story__video-unmute-hint:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 3px;
}

.case-story__card.is-audio-unlocked .case-story__video-unmute-hint {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-3px);
}

.case-story__card--plyr-patch .plyr {
  --plyr-color-main: #d4f53c;
  --plyr-range-fill-background: #d4f53c;
  --plyr-video-background: #1a0a2e;
  --plyr-range-thumb-background: #d4f53c;
  --plyr-video-controls-background: linear-gradient(rgba(26, 10, 46, 0), rgba(26, 10, 46, 0.88));
  --plyr-tooltip-background: #2e0f4e;
  --plyr-tooltip-color: #d4f53c;
}

.case-story__card--plyr-spacecraft .plyr {
  --plyr-color-main: #5c83ff;
  --plyr-range-fill-background: #5c83ff;
  --plyr-video-background: #060c21;
  --plyr-range-thumb-background: #5c83ff;
  --plyr-video-controls-background: linear-gradient(rgba(6, 12, 33, 0), rgba(6, 12, 33, 0.88));
  --plyr-tooltip-background: #0d1a4a;
  --plyr-tooltip-color: #b6c6ff;
}

.case-story__card--plyr-blaney .plyr {
  --plyr-color-main: #f4c744;
  --plyr-range-fill-background: #f4c744;
  --plyr-video-background: #202129;
  --plyr-range-thumb-background: #f4c744;
  --plyr-video-controls-background: linear-gradient(rgba(32, 33, 41, 0), rgba(32, 33, 41, 0.88));
  --plyr-tooltip-background: #211f18;
  --plyr-tooltip-color: #ffe18a;
}

.case-story__card--plyr-spin .plyr {
  --plyr-color-main: #ff2d3d;
  --plyr-range-fill-background: #ff2d3d;
  --plyr-video-background: #05070d;
  --plyr-range-thumb-background: #ffb020;
  --plyr-video-controls-background: linear-gradient(rgba(5, 7, 13, 0), rgba(5, 7, 13, 0.92));
  --plyr-tooltip-background: #21150c;
  --plyr-tooltip-color: #ffd17a;
}

.case-story__card--plyr-patch .plyr__control--overlaid {
  border: 1px solid rgba(212, 245, 60, 0.4);
  background: rgba(212, 245, 60, 0.15);
}

.case-story__card--plyr-patch .plyr__control--overlaid:hover {
  background: rgba(212, 245, 60, 0.28);
}

.case-story__card--plyr-patch .plyr__progress input[type=range]::-webkit-slider-thumb {
  background: #d4f53c;
  box-shadow: 0 0 6px rgba(212, 245, 60, 0.5);
}

.case-story__card--plyr-spacecraft .plyr__control--overlaid {
  border: 1px solid rgba(92, 131, 255, 0.4);
  background: rgba(92, 131, 255, 0.15);
}

.case-story__card--plyr-spacecraft .plyr__control--overlaid:hover {
  background: rgba(92, 131, 255, 0.28);
}

.case-story__card--plyr-spacecraft .plyr__progress input[type=range]::-webkit-slider-thumb {
  background: #5c83ff;
  box-shadow: 0 0 6px rgba(92, 131, 255, 0.5);
}

.case-story__card--plyr-blaney .plyr__control--overlaid {
  border: 1px solid rgba(244, 199, 68, 0.42);
  background: rgba(244, 199, 68, 0.16);
}

.case-story__card--plyr-blaney .plyr__control--overlaid:hover {
  background: rgba(244, 199, 68, 0.28);
}

.case-story__card--plyr-blaney .plyr__progress input[type=range]::-webkit-slider-thumb {
  background: #f4c744;
  box-shadow: 0 0 6px rgba(244, 199, 68, 0.5);
}

.case-story__card--plyr-spin .plyr__control--overlaid {
  border: 1px solid rgba(255, 45, 61, 0.46);
  background: rgba(255, 45, 61, 0.18);
}

.case-story__card--plyr-spin .plyr__control--overlaid:hover {
  background: rgba(255, 45, 61, 0.32);
}

.case-story__card--plyr-spin .plyr__progress input[type=range]::-webkit-slider-thumb {
  background: #ffb020;
  box-shadow: 0 0 6px rgba(255, 176, 32, 0.56);
}

@media (pointer: fine) {
  .case-story__card--plyr-patch:hover,
  .case-story__card--plyr-spacecraft:hover,
  .case-story__card--plyr-blaney:hover,
  .case-story__card--plyr-spin:hover {
    box-shadow: none;
  }
}

/* Spin a Ball — Pro Sports Arena theme.
   Large surfaces stay dark navy/black; red is the main accent, amber is a
   restrained highlight, and green appears only in tiny status-like moments. */
.case-story--spin-a-ball .case-story__section--arena::before {
  background:
    radial-gradient(circle at 82% 12%,
      rgba(255, 255, 255, .08) 0%,
      rgba(255, 255, 255, .045) 18%,
      rgba(255, 255, 255, .015) 34%,
      rgba(255, 255, 255, 0) 50%),
    radial-gradient(circle at 18% 18%,
      rgba(255, 176, 32, .11) 0%,
      rgba(255, 176, 32, .075) 14%,
      rgba(255, 176, 32, .040) 28%,
      rgba(255, 176, 32, .016) 42%,
      rgba(255, 176, 32, 0) 58%),
    radial-gradient(circle at 22% 80%,
      rgba(255, 45, 61, .18) 0%,
      rgba(255, 45, 61, .13) 16%,
      rgba(255, 45, 61, .075) 30%,
      rgba(255, 45, 61, .030) 44%,
      rgba(255, 45, 61, 0) 62%);
}

.case-story--spin-a-ball .case-story__section--arena::after,
.case-story--spin-a-ball .case-story__section--scope::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: url("../img/portal/blue-noise-64.png") 0 0 / 96px 96px repeat;
  mix-blend-mode: soft-light;
  opacity: .018;
}

.case-story--spin-a-ball .case-story__section--arena::after {
  mask-image:
    radial-gradient(circle at 18% 18%, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .52) 18%, rgba(0, 0, 0, .22) 40%, transparent 58%),
    radial-gradient(circle at 22% 80%, rgba(0, 0, 0, .90) 0%, rgba(0, 0, 0, .66) 18%, rgba(0, 0, 0, .28) 42%, transparent 62%);
  -webkit-mask-image:
    radial-gradient(circle at 18% 18%, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .52) 18%, rgba(0, 0, 0, .22) 40%, transparent 58%),
    radial-gradient(circle at 22% 80%, rgba(0, 0, 0, .90) 0%, rgba(0, 0, 0, .66) 18%, rgba(0, 0, 0, .28) 42%, transparent 62%);
}

.case-story--spin-a-ball .case-story__section--scope::after {
  mask-image:
    radial-gradient(circle at 18% 82%, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .62) 18%, rgba(0, 0, 0, .24) 40%, transparent 60%);
  -webkit-mask-image:
    radial-gradient(circle at 18% 82%, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .62) 18%, rgba(0, 0, 0, .24) 40%, transparent 60%);
}

.case-story--spin-a-ball .case-story__section--arena {
  position: relative;
  isolation: isolate;
}

.case-story--spin-a-ball .case-story__section--arena .case-story__kicker {
  color: rgba(255, 255, 255, .82);
}

.case-story--spin-a-ball .case-story__section--arena .case-story__rule {
  background: linear-gradient(90deg, rgba(255, 45, 61, .96), rgba(255, 176, 32, .88), rgba(244, 247, 250, .84));
  opacity: .96;
}

.case-story--spin-a-ball .case-story__section--arena .case-story__device,
.case-story--spin-a-ball .case-story__section--arena .case-story__card,
.case-story--spin-a-ball .case-story__section--arena .case-story__screen,
.case-story--spin-a-ball .case-story__section--arena .case-story__poster {
  background: rgba(255, 255, 255, .07);
  box-shadow: none;
}

.case-story--spin-a-ball .case-story__section--arena .case-story__badge {
  background: rgba(255, 255, 255, .94);
  color: #071019;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .16);
}

.case-story--spin-a-ball .case-story__section--arena .case-story__followup {
  color: rgba(255, 255, 255, .90);
}


/* ============================================================
   CASE SCOPE FOOTER
   ============================================================ */
.case-story__section--scope {
  margin-top: 0;
  padding: var(--case-scope-pad-y) var(--case-section-pad-x);
  border-top: 1px solid rgba(255, 255, 255, .07);
  border-radius: 0 0 28px 28px;
  background: linear-gradient(180deg, rgba(14, 16, 32, .98), rgba(8, 10, 20, .98));
  box-shadow: none;
  color: #fff;
}

.case-story--watchers-eye .case-story__section--scope {
  background: linear-gradient(180deg, rgba(36, 46, 27, .98), rgba(26, 33, 19, .99));
}

.case-story--spin-a-ball .case-story__section--scope {
  position: relative;
  isolation: isolate;
  border-top-color: rgba(255, 255, 255, .055);
  background:
    radial-gradient(circle at 18% 82%,
      rgba(255, 45, 61, .14) 0%,
      rgba(255, 45, 61, .10) 15%,
      rgba(255, 45, 61, .058) 29%,
      rgba(255, 45, 61, .022) 43%,
      rgba(255, 45, 61, 0) 60%),
    radial-gradient(circle at 82% 18%,
      rgba(40, 209, 124, .065) 0%,
      rgba(40, 209, 124, .040) 24%,
      rgba(40, 209, 124, 0) 50%),
    linear-gradient(90deg, rgba(7, 16, 25, .99) 0%, rgba(11, 22, 35, .99) 56%, rgba(5, 10, 18, .99) 100%);
}

.case-story--pacsci-emc .case-story__section--scope {
  background: linear-gradient(180deg, rgba(7, 12, 32, .98), rgba(5, 8, 22, .99));
}

.case-story--ride-with-blaney .case-story__section--scope {
  background: linear-gradient(180deg, rgba(28, 28, 34, .98), rgba(18, 18, 22, .99));
}


.case-story--sour-patch-catch .case-story__section--candy:nth-of-type(2) .case-story__icon-list li:nth-child(1) img,
.case-story--sour-patch-catch .case-story__section--candy:nth-of-type(2) .case-story__icon-list li:nth-child(2) img,
.case-story--sour-patch-catch .case-story__section--candy:nth-of-type(2) .case-story__icon-list li:nth-child(3) img {
  flex: 0 0 53px;
  width: 53px;
  height: 53px;
  padding: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

.case-story--sour-patch-catch .case-story__section--scope {
  background: linear-gradient(180deg, rgba(200, 160, 218, .98), rgba(182, 144, 202, .99));
  color: #1d1730;
  border-top-color: rgba(29, 23, 48, .12);
}

.case-story--surreal-lash-experience .case-story__section--scope {
  background: linear-gradient(180deg, rgba(230, 90, 128, .98), rgba(210, 75, 112, .99));
  color: #1d0611;
  border-top-color: rgba(29, 6, 17, .12);
}

.case-story--nfl-scan-a-helmet .case-story__section--scope {
  background: linear-gradient(180deg, rgba(9, 20, 52, .98), rgba(7, 14, 36, .99));
}

.case-story__scope {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--case-small-gap) var(--case-copy-gap-md);
}

.case-story__scope-label {
  flex-shrink: 0;
  font-size: var(--text-11);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: .45;
}

.case-story__scope-text {
  margin: 0;
  font-size: var(--text-flow-sm);
  line-height: 1.6;
  opacity: .50;
}

.case-story__scope-legal {
  width: 100%;
  margin: var(--case-small-gap) 0 0;
  font-size: var(--text-11);
  line-height: 1.6;
  opacity: .5;
}

.case-story__back-to-top-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: clamp(10px, 1.3vw, 18px) 0 clamp(4px, .7vw, 10px);
}

.case-story__back-to-top-wrap .cp-back-to-top--case {
  color: var(--case-scroll-cue-fg);
  border-color: var(--case-scroll-cue-border);
  background: var(--case-scroll-cue-bg);
}

.case-story__rights-note {
  width: 100%;
  margin: calc(var(--case-small-gap) * .72) 0 0;
}

.case-story__rights-note-toggle {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: var(--text-11);
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: .5;
  cursor: pointer;
}

.case-story__rights-note-toggle:hover,
.case-story__rights-note-toggle:focus-visible {
  opacity: .78;
}

.case-story__rights-note-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 4px;
}

.case-story__rights-note-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  font-size: var(--text-12);
  line-height: 1;
  opacity: .82;
}

.case-story__rights-note-body {
  width: 100%;
  margin: .85em 0 0;
  font-size: var(--text-11);
  line-height: 1.6;
  opacity: .5;
}

.case-story__rights-note-body[hidden] {
  display: none;
}

/* ============================================================
   CASE OVERLAY SCROLLBARS
   The case popup owns its own scroll column. Track/thumb colours are
   tokenised per case so the rail stays legible against the shell blur
   and the active story palette without becoming visually harsh. Explore
   mirrors the same spec in interactive-ui.css with its own light-shell tokens.
   ============================================================ */
html::-webkit-scrollbar,
.case-overlay__content::-webkit-scrollbar {
  width: var(--case-scrollbar-width, 10px);
  height: var(--case-scrollbar-width, 10px);
}

/* The rounded content clip used to hide only the painted ends of the native
   rail while Chromium still calculated thumb travel against the full
   rectangular scrollbar box. At the bottom limit that let the thumb outrun
   the visible track and exposed a grey cap in the case corner. Inset the
   actual native track itself, symmetrically, so paint geometry and travel
   geometry are the same object. */
.case-overlay__content::-webkit-scrollbar-track {
  margin-block: var(--case-scrollbar-edge-inset, 0px);
  background: var(--case-scrollbar-track);
  border-radius: 999px;
}

.case-overlay__content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--case-scrollbar-thumb), var(--case-scrollbar-thumb));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  /* An outer 1px shadow was visible as a dirty grey crescent at the rounded
     frame limits. The inset highlight preserves definition without painting
     outside the thumb's own geometry. */
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* Complete the custom WebKit scrollbar surface instead of allowing platform
   button/corner paint to leak into the rounded case frame. */
.case-overlay__content::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.case-overlay__content::-webkit-scrollbar-corner {
  background: transparent;
}

.case-overlay__content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--case-scrollbar-thumb-hover), var(--case-scrollbar-thumb-hover));
  background-clip: padding-box;
}

.case-overlay__content {
  scrollbar-color: var(--case-scrollbar-thumb) var(--case-scrollbar-track);
}

/* Per-case scrollbar palette (--case-scrollbar-*, --case-scroll-*) is no
   longer hand-written here either -- generated at runtime from the same
   js/case-themes.js, alongside the frame colors above. */

/* ============================================================
   RESPONSIVE BASE
   Stacked/mobile layouts fill the visual viewport edge-to-edge with square
   corners. .case-overlay__content remains the sole scroll owner so the shell,
   Tiled Reveal and native scrollbar stay in one stable coordinate system.
   ============================================================ */
@media only screen and (orientation: portrait), only screen and (max-width: 1023.98px), only screen and (max-height: 599.98px) {
  .case-overlay {
    position: fixed;
    inset: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    /* Mobile popups are edge-to-edge with square corners, so no backdrop
       filtering is needed behind the case surface. */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .case-overlay__panel {
    /* Mobile case windows use the complete visual viewport with square edges. */
    --cp-case-mobile-frame-gutter: 0px;
    --cp-overlay-panel-pad: 0px;
    --cp-overlay-close-offset: 12px;
    --cp-case-frame-radius: 0px;
    inset: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 0;
    border-radius: 0;
    box-sizing: border-box;
  }

  .case-overlay__content {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 0;
    -webkit-clip-path: none;
    clip-path: none;
    box-sizing: border-box;
  }

  /* Panel-level controls follow the same mobile frame gutter instead of the
     raw viewport edge. This keeps their optical inset identical to desktop
     while preserving safe-area compensation. */
  .case-overlay__close {
    top: calc(var(--cp-case-mobile-frame-gutter) + var(--cp-overlay-close-offset) + env(safe-area-inset-top, 0px));
    right: calc(var(--cp-case-mobile-frame-gutter) + var(--cp-overlay-close-offset) + env(safe-area-inset-right, 0px));
    /* Match the What We Do popup control exactly on mobile. */
    width: 44px;
    height: 44px;
  }

  /* Mobile keeps the same scroll affordance language as desktop, but uses
     a shorter/lighter haze so it does not consume too much of a phone viewport.
     The cue stays right-aligned on the close-button column. */
  .case-overlay__scroll-affordance {
    left: var(--cp-case-mobile-frame-gutter);
    right: calc(var(--cp-case-mobile-frame-gutter) + env(safe-area-inset-right, 0px));
    bottom: calc(var(--cp-case-mobile-frame-gutter) + env(safe-area-inset-bottom, 0px));
    width: auto;
    height: 62px;
    align-items: flex-end;
    justify-content: flex-end;
    transform: translateY(6px);
  }

  .case-overlay__scroll-affordance.is-visible {
    transform: translateY(0);
  }

  .case-overlay__scroll-edge {
    display: block;
    left: 0;
    right: 0;
    bottom: 0;
    height: 62px;
    border-radius: 0 0 var(--cp-case-frame-radius) var(--cp-case-frame-radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 18%, var(--case-scroll-hint-edge) 72%, var(--case-scroll-hint-edge) 100%);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.56) 48%, rgba(0, 0, 0, 1) 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.56) 48%, rgba(0, 0, 0, 1) 100%);
  }

  .case-overlay__scroll-cue {
    width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0 calc(var(--cp-overlay-close-offset, 12px)) 6px 0;
    padding: 0;
    gap: 0;
    justify-content: center;
  }

  .case-overlay__scroll-cue > span {
    display: none;
  }

  .case-overlay__scroll-cue-icon {
    width: 11px;
    height: 11px;
    border-right-width: 2px;
    border-bottom-width: 2px;
    transform: rotate(45deg) translate3d(-1.5px, -1.5px, 0);
    animation: case-scroll-cue-nudge 1.7s ease-in-out infinite;
  }

  /* The chevron is rotated 45deg, so equal local x/y offsets read as a pure
     vertical bob on screen — a quiet "you can scroll down" hint. */
  @keyframes case-scroll-cue-nudge {
    0%, 100% {
      transform: rotate(45deg) translate3d(-2.5px, -2.5px, 0);
      opacity: 0.55;
    }
    55% {
      transform: rotate(45deg) translate3d(0.5px, 0.5px, 0);
      opacity: 1;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .case-overlay__scroll-cue-icon {
      animation-duration: 4.25s;
    }
  }

  .case-overlay__shell {
    --case-frame-gap: 14px;
    --case-section-pad-y: 24px;
    --case-section-pad-x: 18px;
    --case-grid-gap: 22px;
    --case-media-gap: 16px;
    --case-small-gap: 10px;
    --case-copy-gap-sm: 14px;
    --case-copy-gap-md: 18px;
    --case-copy-gap-lg: 22px;
    --case-scope-pad-y: 18px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding: 0;
    box-sizing: border-box;
  }

  .case-overlay__hero {
    padding: calc(68px + env(safe-area-inset-top)) 20px 26px;
    box-sizing: border-box;
  }

  .case-overlay__studio-logo {
    top: calc(20px + env(safe-area-inset-top));
  }

  .case-overlay__studio-logo.has-client-logo {
    width: min(220px, calc(100% - 40px));
    column-gap: 12px;
  }

  .case-overlay__studio-logo img {
    width: 92px;
  }

  .case-overlay__client-logo-divider {
    min-height: 26px;
  }

  .case-overlay__studio-logo img.case-overlay__client-logo {
    width: auto;
    height: auto;
    max-width: 64px;
    max-height: 26px;
  }

  .case-overlay[data-case="sour-patch-catch"] .case-overlay__studio-logo img.case-overlay__client-logo {
    max-width: 34px;
    max-height: 34px;
  }

  .case-story__authenticity {
    gap: 8px;
    max-width: calc(100% - 8px);
    margin-top: 22px;
    margin-bottom: 18px;
    padding: 8px 11px;
    font-size: var(--text-11);
  }

  .case-story__authenticity-marker {
    width: 5px;
    height: 5px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.07);
  }

  .case-overlay__brand {
    margin-bottom: 8px;
    font-size: var(--text-11);
    letter-spacing: 0.12em;
  }

  .case-overlay__title {
    margin-bottom: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: var(--text-flow-m-display);
    line-height: 1.1;
    text-wrap: balance;
  }

  .case-overlay__summary {
    display: none;
    margin: 0;
  }

  .case-overlay__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
  }

  .case-story__copy p {
    /* Mobile regression guard: the fluid tokens resolve to their max when
       rem is fixed at 16px (stacked layout mode), which bumped story copy 16→20px and
       badges/lists 15→18px. Standard mobile body size reads best. */
    font-size: var(--text-16);
  }

  .case-story__badge--brand-pill,
  .case-story__icon-list li {
    font-size: var(--text-16);
  }

  .case-overlay__tags span {
    min-height: 34px;
    padding: 7px 12px;
    font-size: var(--text-14);
    white-space: normal;
  }

  .case-overlay__hero-head {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
    padding-right: 52px;
  }

  .case-overlay__hero-head .case-overlay__brand {
    padding-top: 0;
  }

  .case-overlay__case-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .case-overlay__case-nav--top {
    flex: none;
    justify-content: stretch;
    max-width: 100%;
  }

  .case-overlay__case-nav--bottom {
    grid-template-columns: 1fr;
    padding: 14px 20px calc(22px + env(safe-area-inset-bottom));
  }

  .case-overlay__case-nav--top .case-overlay__case-nav-title {
    display: none;
  }

  .case-overlay__case-nav-link,
  .case-overlay__case-nav--top .case-overlay__case-nav-link,
  .case-overlay__case-nav--bottom .case-overlay__case-nav-link {
    width: 100%;
    max-width: none;
    min-height: 46px;
    gap: 8px;
    padding: 10px 11px;
    border-radius: 16px;
  }

  .case-overlay__case-nav--bottom .case-overlay__case-nav-link {
    min-height: 58px;
  }

  .case-overlay__case-nav-arrow {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
    font-size: var(--text-14);
  }

  .case-overlay__case-nav-label {
    font-size: var(--text-10);
    letter-spacing: 0.12em;
  }

  .case-overlay__case-nav-title,
  .case-overlay__case-nav--bottom .case-overlay__case-nav-title {
    font-size: var(--text-14);
    line-height: 1.1;
  }

  .case-overlay__body {
    --case-frame-gap: 14px;
    --case-section-pad-y: 24px;
    --case-section-pad-x: 18px;
    --case-grid-gap: 22px;
    --case-media-gap: 16px;
    --case-small-gap: 10px;
    --case-copy-gap-sm: 14px;
    --case-copy-gap-md: 18px;
    --case-copy-gap-lg: 22px;
    --case-scope-pad-y: 18px;
    padding: var(--case-frame-gap) 20px 40px;
    box-sizing: border-box;
  }

  .case-story {
    width: 100%;
    max-width: 100%;
    gap: var(--case-frame-gap);
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .case-story__section {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding: var(--case-section-pad-y) var(--case-section-pad-x);
    border-radius: 22px;
    box-sizing: border-box;
  }

  .case-story__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--case-grid-gap);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    align-items: start;
  }

  .case-story__copy,
.case-story__media,
.case-story__card,
.case-story__gallery,
.case-story__row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .case-story__copy,
  .case-story__media {
    padding: 0;
  }

  .case-story__media {
    margin: 0;
  }

  .case-story__gallery,
.case-story__gallery--3,
.case-story__row {
    grid-template-columns: 1fr;
    gap: var(--case-media-gap);
  }

  .case-story__lead {
    display: block;
  }

  .case-story__lead-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: inline mandatory;
    scroll-behavior: smooth;
    align-items: start;
    transition: height 180ms ease;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .case-story__lead-carousel::-webkit-scrollbar {
    display: none;
  }

  .case-story__lead-carousel .case-story__lead-slide,
  .case-story__lead-carousel .case-story__lead-slide + .case-story__lead-slide {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding-right: 2px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .case-story__lead-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
  }

  .case-story__lead-carousel-dot {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    color: inherit;
    cursor: pointer;
  }

  .case-story__lead-carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
  }

  .case-story__lead-carousel-dot {
    position: relative;
    width: 22px;
    height: 20px;
    padding: 0;
    background: transparent;
  }

  .case-story__lead-carousel-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.28;
    transform: translate(-50%, -50%);
    transition: width 180ms ease, opacity 180ms ease;
  }

  .case-story__lead-carousel-dot.is-active::before {
    width: 18px;
    border-radius: 999px;
    opacity: 0.9;
  }

.case-story__lead-carousel-dot:focus-visible {
  outline: none;
}

.case-story__lead-carousel-dot:focus-visible::after {
  content: '';
  position: absolute;
  inset: 1px;
  border: 2px solid currentColor;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0.9;
}

  @media (prefers-reduced-motion: reduce) {
    .case-story__lead-carousel {
      scroll-behavior: smooth;
      transition-duration: 450ms;
    }

    .case-story__lead-carousel-dot::before {
      transition-duration: 450ms;
    }
  }

  .case-story__rule {
    display: none;
  }

  .case-story__device--tall {
    max-width: none;
  }

  .case-story__kicker {
    margin-bottom: var(--case-copy-gap-sm);
  }

  .case-story__heading {
    margin-bottom: var(--case-copy-gap-md);
    font-size: var(--text-flow-m-display);
    line-height: 1.14;
  }

  .case-story__icon-list {
    gap: var(--case-small-gap);
  }

  .case-story__followup {
    margin-top: var(--case-copy-gap-md);
  }

  .case-story__icon-list + .case-story__followup {
    margin-top: clamp(22px, 5vw, 28px);
  }

  .case-story__brandline {
    gap: var(--case-small-gap);
    margin-top: var(--case-copy-gap-lg);
  }

  .case-story--spin-a-ball .case-story__brandline--spin-event {
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 340px);
  }

  .case-story--spin-a-ball .case-story__brandline--spin-event .case-story__badge--brand-pill {
    width: 100%;
  }

  .case-story__stats {
    gap: var(--case-small-gap);
    margin-top: var(--case-copy-gap-md);
  }

  .case-story__stat {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .case-story__play {
    width: 64px;
    height: 64px;
  }

  .case-overlay img,
  .case-overlay video,
  .case-story img,
  .case-story video,
  .case-story canvas,
  .case-story svg {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
  }

  .case-story__bg-art {
    width: 100%;
    max-width: 100vw;
  }
}

/* Narrow-phone safeguard: after the overlay and section gutters, a 320px
   viewport leaves 244px for the event card. Compress the logo group just
   enough to preserve the title's right inset without changing 360px+ phones. */
@media only screen and (max-width: 340px) {
  .case-story--spin-a-ball .case-story__event-card {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .case-story--spin-a-ball .case-story__event-logos {
    width: 116px;
    gap: 6px;
    padding-right: 5px;
  }

  .case-story--spin-a-ball .case-story__event-logo--tiaa {
    max-width: 46px;
  }

  .case-story--spin-a-ball .case-story__event-logo--big-ten {
    max-width: 52px;
  }
}

@media only screen and (max-width: 600px) {
  .case-story__section--scope {
    padding: var(--case-scope-pad-y) var(--case-section-pad-x);
  }

  .case-story__scope {
    flex-direction: column;
    gap: 6px;
  }

  .case-story__back-to-top-wrap {
    padding-top: var(--case-copy-gap-md);
    padding-bottom: 4px;
  }
}


/* ============================================================
   SOUR PATCH CATCH FIRST SECTION
   ============================================================ */
.case-story--sour-patch-catch .case-story__section--candy:first-of-type {
  overflow: hidden;
  padding-bottom: var(--case-section-pad-y);
}

.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__grid {
  position: relative;
  z-index: 1;
  align-items: start;
}

.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__copy {
  position: relative;
  z-index: 1;
  max-width: none;
  padding-bottom: 0;
}

.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__lead--sour-patch {
  position: relative;
  display: flex;
  align-items: stretch;
}

.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__lead--sour-patch::before {
  content: none;
  display: none;
}

.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__lead-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__hearts-decor {
  display: block;
  width: clamp(178px, 29.7vw, 256px);
  max-width: 100%;
  height: auto;
  margin: -8px 0 calc(var(--case-copy-gap-sm) - 8px) 0;
}

/* Sour Patch heart cadence — inline SVG removes the separate object-document
   load that could finish after the tiled reveal on older phones. A single root
   class drives one compositor timeline; only transforms and one-frame color
   switches are animated, so the five authored steps stay crisp under load. */
.case-story--sour-patch-catch .case-story__hearts-decor {
  overflow: visible;
}

.case-story--sour-patch-catch .case-story__hearts-decor .heart-group {
  --heart-delay: 0ms;
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform;
  backface-visibility: hidden;
}

.case-story--sour-patch-catch .case-story__hearts-decor .heart-group:first-of-type {
  transform-origin: left center;
}

.case-story--sour-patch-catch .case-story__hearts-decor .heart-group:nth-of-type(2) { --heart-delay: 170ms; }
.case-story--sour-patch-catch .case-story__hearts-decor .heart-group:nth-of-type(3) { --heart-delay: 340ms; }
.case-story--sour-patch-catch .case-story__hearts-decor .heart-group:nth-of-type(4) { --heart-delay: 510ms; }
.case-story--sour-patch-catch .case-story__hearts-decor .heart-group:nth-of-type(5) { --heart-delay: 680ms; }

.case-story--sour-patch-catch .case-story__hearts-decor.is-playing .heart-group {
  animation: sour-patch-heart-pop 360ms cubic-bezier(.16, 1, .3, 1) var(--heart-delay) forwards;
}

.case-story--sour-patch-catch .case-story__hearts-decor.is-playing .heart-fill {
  animation: sour-patch-heart-fill-on 1ms steps(1, end) var(--heart-delay) forwards;
}

.case-story--sour-patch-catch .case-story__hearts-decor.is-playing .heart-outline {
  animation: sour-patch-heart-outline-on 1ms steps(1, end) var(--heart-delay) forwards;
}

.case-story--sour-patch-catch .case-story__hearts-decor.is-playing .heart-shine {
  animation: sour-patch-heart-shine-on 1ms steps(1, end) var(--heart-delay) forwards;
}

.case-story--sour-patch-catch .case-story__hearts-decor.is-complete .heart-fill {
  fill: #e61e2b;
}

.case-story--sour-patch-catch .case-story__hearts-decor.is-complete .heart-outline {
  fill: #000;
}

.case-story--sour-patch-catch .case-story__hearts-decor.is-complete .heart-shine {
  opacity: 1;
}

@keyframes sour-patch-heart-pop {
  0% { transform: scale(.9); }
  48% { transform: scale(1.22); }
  74% { transform: scale(.97); }
  100% { transform: scale(1); }
}

@keyframes sour-patch-heart-fill-on {
  to { fill: #e61e2b; }
}

@keyframes sour-patch-heart-outline-on {
  to { fill: #000; }
}

@keyframes sour-patch-heart-shine-on {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .case-story--sour-patch-catch .case-story__hearts-decor.is-playing .heart-group,
  .case-story--sour-patch-catch .case-story__hearts-decor.is-playing .heart-fill,
  .case-story--sour-patch-catch .case-story__hearts-decor.is-playing .heart-outline,
  .case-story--sour-patch-catch .case-story__hearts-decor.is-playing .heart-shine {
    animation: none;
  }

  .case-story--sour-patch-catch .case-story__hearts-decor.is-playing .heart-fill {
    fill: #e61e2b;
  }

  .case-story--sour-patch-catch .case-story__hearts-decor.is-playing .heart-outline {
    fill: #000;
  }

  .case-story--sour-patch-catch .case-story__hearts-decor.is-playing .heart-shine {
    opacity: 1;
  }
}

.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__lead > div:last-child::before,
.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__lead-copy::before {
  content: none;
  display: none;
  float: none;
  width: 0;
  height: 0;
  margin: 0;
  shape-outside: none;
}

.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__lead-copy p {
  width: auto;
  max-width: none;
  text-wrap: normal;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}


.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__mobile-candy-art,
.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__brandline--mobile-sour-patch {
  display: none;
}

.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__bg-art--desktop {
  display: block;
  position: static;
  width: 80%;
  max-width: none;
  height: auto;
  margin: var(--case-small-gap) auto 0;
  transform: none;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  opacity: 0.85;
}

.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__brandline {
  margin-top: var(--case-copy-gap-lg);
  margin-bottom: var(--case-copy-gap-md);
}

.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__brandline--sour-patch-desktop {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__brandline--sour-patch-inline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: var(--case-copy-gap-md);
  margin-bottom: 0;
}

.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__brandline--sour-patch-inline .case-story__badge--logo-only {
  box-shadow: none;
}

.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__brandline--sour-patch-desktop .case-story__badge--logo-only,
.case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__brandline--mobile-sour-patch .case-story__badge--logo-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media only screen and (orientation: portrait), only screen and (max-width: 1023.98px), only screen and (max-height: 599.98px) {
  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__bg-art--desktop {
    width: 80%;
    max-width: none;
  }
}

@media only screen and (orientation: portrait), only screen and (max-width: 1023.98px), only screen and (max-height: 599.98px) {
  .case-story--sour-patch-catch .case-story__section--candy:first-of-type {
    min-height: 0;
    padding-bottom: var(--case-section-pad-y);
  }

  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--case-media-gap);
    width: 100%;
    max-width: 100%;
  }

  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__copy,
  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__lead,
  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__lead-copy {
    display: block;
    flex: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__copy {
    order: 1;
    margin: 0;
    padding: 0;
  }


  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__rule {
    display: none;
  }

  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__copy p,
  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__lead-copy p {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 var(--case-copy-gap-sm) 0;
    padding: 0;
    font-size: var(--text-16);
    line-height: 1.6;
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
  }

  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__hearts-decor {
    width: min(206px, 59.5vw);
    margin-top: -8px;
    margin-bottom: calc(var(--case-copy-gap-sm) - 8px);
  }

  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__media {
    order: 2;
    width: 100%;
  }

  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__mobile-candy-art {
    display: block;
    order: 3;
    width: 100%;
    margin: var(--case-small-gap) 0 0;
  }

  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__mobile-candy-art .case-story__bg-art--mobile {
    display: block;
    position: static;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    transform: none;
    object-fit: contain;
    object-position: center bottom;
  }

  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__brandline--mobile-sour-patch {
    display: flex;
    align-items: center;
    order: 4;
    margin: 0;
  }

  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__brandline--mobile-sour-patch .case-story__badge--logo-only {
    max-width: 100%;
  }

  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__brandline:not(.case-story__brandline--sour-patch-inline),
  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__bg-art--desktop {
    display: none;
  }
}

@media only screen and (max-width: 640px) {
  .case-story--sour-patch-catch .case-story__section--candy:first-of-type .case-story__mobile-candy-art .case-story__bg-art--mobile {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
}



/* ─── Case image lightbox ────────────────────────────────────────────────── */

/* Trigger cursor on zoomable case media */
img.js-lb-trigger,
video.js-lb-trigger {
  cursor: zoom-in;
}

.js-lb-keyboard-trigger {
  cursor: zoom-in;
}

.js-lb-keyboard-trigger:focus-visible {
  outline: 3px solid var(--case-hover-cold-light, rgba(255, 255, 255, 0.96));
  outline-offset: 4px;
  filter: var(--case-hover-ring-filter, drop-shadow(0 0 7px rgba(0, 0, 0, 0.28)));
}

/* AUTHORSHIP: lightbox-enabled media should hint at interactivity without overpowering the case layout. On precise-pointer devices we keep only the restrained media zoom, avoiding rectangular frames or shadows over transparent cutout artwork. */
@property --case-hover-ring-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@keyframes caseHoverStarRingRun {
  from {
    --case-hover-ring-angle: 0deg;
  }
  to {
    --case-hover-ring-angle: 360deg;
  }
}

/* Lightbox shell */
#cp-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20000;
  align-items: center;
  justify-content: center;
}

#cp-lightbox.is-open,
#cp-lightbox.is-preparing {
  display: flex;
}

#cp-lightbox.is-preparing {
  visibility: hidden;
  pointer-events: none;
}

/* Backdrop */
#cp-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 20, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

#cp-lightbox.is-open #cp-lightbox__backdrop {
  opacity: 1;
}

/* Frame */
#cp-lightbox__frame {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: min(92vw, 1300px);
  max-height: 90svh;
  transform: scale(0.93) translateY(12px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

#cp-lightbox.is-open #cp-lightbox__frame {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Lightbox media shell: the same running outline language as case-image hover,
   now applied to the enlarged image/video inside the preview. */
#cp-lightbox__media-shell {
  --case-hover-ring-angle: 0deg;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: calc(90svh - 66px);
  border-radius: 16px;
  isolation: isolate;
  animation: caseHoverStarRingRun 2.35s linear infinite;
}

#cp-lightbox__media-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: var(--case-hover-ring-width);
  border-radius: inherit;
  pointer-events: none;
  background: var(--case-hover-ring-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  filter: var(--case-hover-ring-filter);
}

/* Lightbox ring palettes are generated from js/case-themes.js. */

/* Image/video */
#cp-lightbox__img,
#cp-lightbox__video,
#cp-lightbox .cp-lightbox__video-surface {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  max-height: calc(90svh - 66px);
  width: auto;
  height: auto;
  border-radius: inherit;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  object-fit: contain;
  background: #050711;
}

#cp-lightbox__video,
#cp-lightbox .cp-lightbox__video-surface {
  max-width: min(92vw, 1180px);
}

/* While the lightbox owns a case video, remove the paused inline copy from
   paint/compositing without disturbing its aspect-ratio placeholder. This keeps
   mobile Chromium from maintaining two visible hardware video surfaces. */
#case-overlay video[data-cp-lightbox-suspended] {
  visibility: hidden !important;
}

/* Android video compatibility path. Older Adreno/Chrome combinations can
   flash a hardware video surface when it sits below a transformed frame,
   backdrop-filter, a continuously repainted mask/filter ring, or an extra 3D
   promotion. The Android class is applied only while a video item is active;
   images and desktop lightboxes keep the authored treatment. */
#cp-lightbox.cp-lightbox--android-video-compat #cp-lightbox__backdrop {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: rgba(6, 8, 20, 0.96);
  transition: none;
}

#cp-lightbox.cp-lightbox--android-video-compat #cp-lightbox__frame {
  transform: none !important;
  transition: none;
  opacity: 1;
}

#cp-lightbox.cp-lightbox--android-video-compat #cp-lightbox__media-shell {
  animation: none !important;
  isolation: auto;
  transform: none;
  will-change: auto;
}

#cp-lightbox.cp-lightbox--android-video-compat #cp-lightbox__media-shell::before {
  filter: none;
}

#cp-lightbox.cp-lightbox--android-video-compat #cp-lightbox__video,
#cp-lightbox.cp-lightbox--android-video-compat .cp-lightbox__video-surface {
  -webkit-backface-visibility: visible;
  backface-visibility: visible;
  transform: none !important;
  will-change: auto;
  box-shadow: none;
}

#cp-lightbox__img[hidden],
#cp-lightbox__video[hidden] {
  display: none;
}

#cp-lightbox__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 18px;
}

/* Caption */
#cp-lightbox__caption,
#cp-lightbox__counter {
  color: rgba(255, 255, 255, 0.48);
  font-size: var(--text-12);
  letter-spacing: 0.04em;
  text-align: center;
  margin: 0;
  line-height: 1.35;
}

#cp-lightbox__caption {
  max-width: min(86vw, 760px);
}

#cp-lightbox__counter {
  color: rgba(255, 255, 255, 0.34);
  white-space: nowrap;
}

/* Close button */
#cp-lightbox__close {
  position: fixed;
  top: max(20px, env(safe-area-inset-top, 20px));
  right: max(20px, env(safe-area-inset-right, 20px));
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  z-index: 3;
}

#cp-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: scale(1.08);
}

#cp-lightbox__close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.case-overlay .btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.96);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px rgba(0, 0, 90, 0.72);
}

#cp-lightbox__close svg {
  width: 18px;
  height: 18px;
}

.cp-lightbox__nav {
  position: fixed;
  top: 50%;
  pointer-events: auto;
  cursor: pointer;
  background: none;
  border: none;
  padding: 14px;
  color: rgba(255, 255, 255, 0.64);
  opacity: 0.72;
  transform: translateY(-50%);
  transition: opacity 0.35s ease, color 0.2s ease, transform 0.15s ease;
  z-index: 3;
  -webkit-tap-highlight-color: transparent;
}

.cp-lightbox__nav:hover,
.cp-lightbox__nav:focus-visible {
  opacity: 1;
  color: var(--lightblue, #82f6ff);
}

.cp-lightbox__nav:active {
  transform: translateY(-50%) scale(0.85);
}

.cp-lightbox__nav--prev {
  left: max(22px, env(safe-area-inset-left, 22px));
}

.cp-lightbox__nav--next {
  right: max(22px, env(safe-area-inset-right, 22px));
}

.cp-lightbox__nav svg {
  display: block;
  width: 18px;
  height: 32px;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.72)) drop-shadow(0 0 4px rgba(255,255,255,0.18));
}

.cp-lightbox__nav[hidden] {
  display: none;
}

/* Prevent html scroll while lightbox is open — separate from case overlay lock */
html.cp-lightbox-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  #cp-lightbox__frame {
    max-width: 96vw;
  }
  #cp-lightbox__media-shell {
    border-radius: 10px;
  }
  #cp-lightbox__img,
  #cp-lightbox__video,
  #cp-lightbox .cp-lightbox__video-surface {
    border-radius: inherit;
    max-height: calc(86svh - 78px);
  }
  #cp-lightbox__video,
  #cp-lightbox .cp-lightbox__video-surface {
    max-width: 96vw;
  }
  .cp-lightbox__nav {
    top: auto;
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
    padding: 13px 16px;
    transform: none;
  }
  .cp-lightbox__nav:active {
    transform: scale(0.85);
  }
  .cp-lightbox__nav--prev {
    left: max(18px, env(safe-area-inset-left, 18px));
  }
  .cp-lightbox__nav--next {
    right: max(18px, env(safe-area-inset-right, 18px));
  }
}

/* Watcher's Eye image update — uses the three dedicated Figma-exported assets while leaving the shared case structure intact. */
.case-overlay__hero {
  overflow: hidden;
}

.case-overlay__hero-art {
  display: none;
}

.case-overlay__hero-art[hidden] {
  display: none !important;
}

.case-overlay[data-case="watchers-eye"] .case-overlay__hero {
  min-height: 0;
  padding-right: clamp(24px, 4vw, 64px);
}

.case-overlay[data-case="watchers-eye"] .case-overlay__hero .case-overlay__brand,
.case-overlay[data-case="watchers-eye"] .case-overlay__hero .case-overlay__title,
.case-overlay[data-case="watchers-eye"] .case-overlay__hero .case-overlay__summary,
.case-overlay[data-case="watchers-eye"] .case-overlay__hero .case-overlay__tags {
  position: relative;
  z-index: 2;
}

.case-overlay[data-case="watchers-eye"] .case-overlay__hero .case-overlay__hero-art {
  display: none;
}


.case-story--watchers-eye .case-story__card--watchers-image {
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.case-story--watchers-eye .case-story__card--watchers-image img {
  width: 100%;
  height: auto;
}

.case-story--watchers-eye .case-story__watchers-eye-layered {
  --watchers-eye-outline: 30px;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  isolation: isolate;
  container-type: inline-size;
}

@supports (width: 1cqw) {
  .case-story--watchers-eye .case-story__watchers-eye-layered {
    --watchers-eye-outline: 6cqw;
  }
}

.case-story--watchers-eye .case-story__watchers-eye-layered::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  border: var(--watchers-eye-outline) solid transparent;
  background: linear-gradient(135deg, #BF8614 15%, #FFFD86 28%, #FFFD86 69%, #BF8614 85%) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  border-radius: inherit;
  z-index: 3;
  pointer-events: none;
}

.case-story--watchers-eye .case-story__watchers-eye-base,
.case-story--watchers-eye .case-story__watchers-eye-cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.case-story--watchers-eye .case-story__watchers-eye-base {
  z-index: 0;
}

.case-story--watchers-eye .case-story__watchers-eye-cover {
  z-index: 2;
}
.case-story--watchers-eye {
  --watchers-axis-width: clamp(276px, 25vw, 360px);
  --watchers-stand-width: min(80%, 980px);
}

.case-story--watchers-eye .case-story__section:first-of-type .case-story__grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: var(--case-grid-gap);
  align-items: center;
}

.case-story--watchers-eye .case-story__media--watchers-hero {
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-story--watchers-eye .case-story__card--watchers-hero {
  width: min(100%, var(--watchers-axis-width));
  margin-inline: auto;
}

.case-story--watchers-eye .case-story__section--watchers-tech {
  padding-bottom: var(--case-section-pad-y);
}

/* Lock the Watcher's Eye media column to the same desktop axis across both sections so the eye, framed artwork, and installation stack read on one vertical line. */
.case-story--watchers-eye .case-story__section--watchers-tech .case-story__grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: var(--case-grid-gap);
  align-items: stretch;
}

.case-story--watchers-eye .case-story__section--watchers-tech .case-story__copy {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding-bottom: var(--case-copy-gap-lg);
}

.case-story--watchers-eye .case-story__media--watchers-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  min-height: 0;
  padding-right: 0;
  overflow: visible;
  touch-action: none;
}

.case-story--watchers-eye .case-story__card--watchers-frame,
.case-story--watchers-eye .case-story__card--watchers-stand-large {
  overflow: visible;
  margin-inline: auto;
}

.case-story--watchers-eye .case-story__card--watchers-frame {
  width: min(100%, var(--watchers-axis-width));
  align-self: center;
}

.case-story--watchers-eye .case-story__section--watchers-installation {
  padding-bottom: 0;
}

 .case-story--watchers-eye .case-story__watchers-installation-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  min-height: clamp(440px, 44vw, 620px);
}

.case-story--watchers-eye .case-story__card--watchers-stand-large {
  width: var(--watchers-stand-width);
  max-width: none;
  margin-top: auto;
  margin-inline: auto;
  align-self: center;
}

.case-story--watchers-eye .case-story__section--watchers-cta {
  padding-top: clamp(14px, 1.4vw, 20px);
}

.case-story--watchers-eye .case-story__watchers-cta-card {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: clamp(110px, 10vw, 138px);
}

.case-story--watchers-eye .case-story__cta-wrap--watchers-card {
  margin: 0;
  justify-content: center;
}

.case-story--watchers-eye .case-story__cta-wrap--watchers-card .btn {
  white-space: nowrap;
}


@media (orientation: portrait), (max-width: 1023.98px), (max-height: 599.98px) {
  .case-overlay[data-case="watchers-eye"] .case-overlay__hero {
    min-height: auto;
    padding-right: clamp(24px, 4vw, 64px);
    padding-bottom: var(--case-section-pad-y);
  }

  .case-story--watchers-eye .case-story__section:first-of-type .case-story__grid,
  .case-story--watchers-eye .case-story__section--watchers-tech .case-story__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--case-grid-gap);
  }

  .case-story--watchers-eye .case-story__card--watchers-hero {
    width: min(72vw, var(--watchers-axis-width));
  }

  .case-story--watchers-eye .case-story__section--watchers-tech {
    padding-bottom: var(--case-section-pad-y);
  }

  .case-story--watchers-eye .case-story__section--watchers-installation {
    padding-top: 0;
    padding-bottom: 0;
  }

  .case-story--watchers-eye .case-story__watchers-installation-shell {
    min-height: clamp(360px, 48vw, 520px);
  }

  .case-story--watchers-eye .case-story__section--watchers-cta {
    padding-top: 0;
  }

  .case-story--watchers-eye .case-story__watchers-cta-card {
    min-height: 112px;
  }

  .case-story--watchers-eye .case-story__section--watchers-tech .case-story__copy {
    padding-bottom: 0;
  }

  .case-story--watchers-eye .case-story__media--watchers-gallery {
    min-height: 0;
    gap: var(--case-media-gap);
  }

  .case-story--watchers-eye .case-story__card--watchers-frame {
    width: min(100%, var(--watchers-axis-width));
  }

  .case-story--watchers-eye .case-story__card--watchers-stand-large {
    width: min(80%, 820px);
  }
}

@media (max-width: 560px) {
  .case-overlay[data-case="watchers-eye"] .case-overlay__hero {
    padding-bottom: clamp(30px, 3vw, 42px);
  }

  .case-story--watchers-eye {
    --watchers-axis-width: min(80vw, 290px);
    --watchers-stand-width: 100%;
  }

  .case-story--watchers-eye .case-story__card--watchers-hero {
    width: var(--watchers-axis-width);
  }

  .case-story--watchers-eye .case-story__media--watchers-gallery {
    min-height: 0;
    gap: var(--case-media-gap);
  }

  .case-story--watchers-eye .case-story__card--watchers-frame,
  .case-story--watchers-eye .case-story__card--watchers-stand-large {
    max-width: none;
  }

  .case-story--watchers-eye .case-story__card--watchers-frame {
    width: var(--watchers-axis-width);
  }

  .case-story--watchers-eye .case-story__card--watchers-stand-large {
    width: var(--watchers-stand-width);
    margin-inline: auto;
  }

  .case-story--watchers-eye .case-story__watchers-installation-shell {
    min-height: 0;
    width: 100%;
    align-items: center;
  }

  .case-story--watchers-eye .case-story__section--watchers-cta {
    padding-top: 0;
  }

  .case-story--watchers-eye .case-story__watchers-cta-card {
    min-height: 96px;
  }

  .case-story--watchers-eye .case-story__cta-wrap--watchers-card .btn {
    min-height: 44px;
    padding-inline: 18px;
    font-size: var(--text-14);
  }
}

/* Spin a Ball — portrait Plyr cards use the case's arena palette. */
.case-story--spin-a-ball .case-story__card--plyr-spin-portrait {
  width: min(100%, 340px);
  max-width: 340px;
  margin-inline: auto;
  border-radius: 28px;
  box-sizing: border-box;
}

.case-story--spin-a-ball .case-story__card--plyr-spin-portrait .plyr,
.case-story--spin-a-ball .case-story__card--plyr-spin-portrait .plyr__video-wrapper,
.case-story--spin-a-ball .case-story__card--plyr-spin-portrait video {
  aspect-ratio: 9 / 16;
}

.case-story--spin-a-ball .case-story__card--plyr-spin-portrait video {
  object-fit: contain;
  background: #05070d;
}

/* Plyr receives the authored 9:16 ratio for the inline card. In fullscreen the
   player must use the screen dimensions while the portrait frame fits inside
   them without landscape-style cropping. */
.case-story--spin-a-ball .case-story__card--plyr-spin-portrait .plyr:fullscreen,
.case-story--spin-a-ball .case-story__card--plyr-spin-portrait .plyr:-webkit-full-screen,
.case-story--spin-a-ball .case-story__card--plyr-spin-portrait .plyr.plyr--fullscreen-fallback,
.case-story--spin-a-ball .case-story__card--plyr-spin-portrait .plyr:fullscreen .plyr__video-wrapper,
.case-story--spin-a-ball .case-story__card--plyr-spin-portrait .plyr:-webkit-full-screen .plyr__video-wrapper,
.case-story--spin-a-ball .case-story__card--plyr-spin-portrait .plyr.plyr--fullscreen-fallback .plyr__video-wrapper {
  aspect-ratio: auto !important;
  padding-bottom: 0 !important;
}

.case-story--spin-a-ball .case-story__card--plyr-spin-portrait .plyr:fullscreen video,
.case-story--spin-a-ball .case-story__card--plyr-spin-portrait .plyr:-webkit-full-screen video,
.case-story--spin-a-ball .case-story__card--plyr-spin-portrait .plyr.plyr--fullscreen-fallback video {
  width: 100%;
  height: 100%;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  transform: none !important;
}

@media only screen and (orientation: portrait), only screen and (max-width: 760px) {
  .case-story--spin-a-ball .case-story__card--plyr-spin-portrait {
    width: min(82vw, 340px);
    border-radius: 24px;
  }

  .case-story--spin-a-ball .case-story__card--plyr-spin-portrait .plyr {
    border-radius: 24px;
  }
}

/* Lightbox cue: a small white plus reads as "open / expand". The running border is shared by all case images; the plus is reserved for actual lightbox targets. */
@media (hover: hover) and (pointer: fine) {
  .case-story__card[data-lightbox="true"][data-hover-highlight="true"]::after,
  .case-story__device[data-lightbox="true"][data-hover-highlight="true"]::after {
    content: "";
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    display: block;
    opacity: 0;
    transform: translateY(-4px) scale(0.92);
    pointer-events: none;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background:
      linear-gradient(#fff, #fff) center / 11px 1.6px no-repeat,
      linear-gradient(#fff, #fff) center / 1.6px 11px no-repeat,
      rgba(10, 12, 18, 0.38);
    box-shadow:
      0 8px 18px rgba(0, 0, 0, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      background-color 0.18s ease;
    z-index: 3;
  }

  .case-story__card[data-lightbox="true"][data-hover-highlight="true"]:hover::after,
  .case-story__device[data-lightbox="true"][data-hover-highlight="true"]:hover::after {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Shared image hover ring: extend the original running border to every case image.
   The plus cue remains reserved for images that actually open the lightbox. */
@media (hover: hover) and (pointer: fine) {
  .case-story__card[data-hover-highlight="true"],
  .case-story__device[data-hover-highlight="true"] {
    --case-hover-ring-angle: 0deg;
    position: relative;
    isolation: isolate;
    transform-origin: center center;
  }

  .case-story__card[data-hover-highlight="true"]::before,
  .case-story__device[data-hover-highlight="true"]::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: var(--case-hover-ring-width);
    border-radius: inherit;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    background: var(--case-hover-ring-gradient);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    filter: var(--case-hover-ring-filter);
    transition: opacity 0.24s ease;
  }

  .case-story__card[data-hover-highlight="true"]:hover,
  .case-story__device[data-hover-highlight="true"]:hover {
    /* Animate the source angle on the hovered media element itself.
       This keeps case-specific outline palettes moving even when the
       gradient is supplied through inherited custom properties. */
    animation: caseHoverStarRingRun 2.35s linear infinite;
  }

  .case-story__card[data-hover-highlight="true"]:hover::before,
  .case-story__device[data-hover-highlight="true"]:hover::before {
    opacity: 1;
  }

  .case-story__card[data-hover-highlight="true"] > img,
  .case-story__device[data-hover-highlight="true"] > img {
    position: relative;
    z-index: 1;
    transition: filter 0.42s ease;
    backface-visibility: hidden;
  }

  .case-story__card[data-hover-highlight="true"]:hover > img,
  .case-story__device[data-hover-highlight="true"]:hover > img {
    filter: saturate(1.025) brightness(1.018);
  }
}


/* Constellation Dial styles moved to css/constellation-dial.css. */

/* Watcher's Eye — delayed desktop cursor gaze and reversible mobile scroll gaze. */
.case-story__watchers-gaze {
  position: fixed;
  inset: 0;
  z-index: 10018;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  overflow: visible;
  opacity: 0;
  visibility: hidden;
  transition: opacity 460ms ease, visibility 0s linear 460ms;
  mix-blend-mode: screen;
}

.case-story__watchers-gaze.is-visible {
  opacity: .60;
  visibility: visible;
  transition: opacity 360ms ease, visibility 0s;
}

.case-story__watchers-gaze-line {
  stroke: rgba(255, 225, 116, 0.62);
  stroke-width: 3.35;
  stroke-linecap: round;
  stroke-dasharray: 10 12;
  filter:
    drop-shadow(0 0 8px rgba(255, 219, 89, 0.30))
    drop-shadow(0 0 16px rgba(74, 255, 198, 0.14));
  vector-effect: non-scaling-stroke;
}

.case-story__watchers-gaze-endpoint {
  fill: rgba(255, 236, 150, 0.52);
  filter: drop-shadow(0 0 9px rgba(255, 225, 116, 0.34));
}

.case-story__watchers-pupil {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 11.25%;
  aspect-ratio: 1;
  pointer-events: none;
  background: url("../img/cases/watchers-eye/icon-eye.webp") no-repeat 50% 50%/contain;
  transform: translate3d(calc(-60% + var(--watchers-pupil-dx, 0px)), calc(-20% + var(--watchers-pupil-dy, 0px)), 0);
  transition: transform 520ms cubic-bezier(.16, .88, .18, 1), opacity 320ms ease;
  opacity: .96;
}

.case-story__watchers-pupil.is-looking {
  opacity: 1;
}

@media (pointer: coarse), (max-width: 760px) {
  .case-story__watchers-gaze {
    opacity: 0;
  }

  .case-story__watchers-pupil {
    transition: opacity 180ms ease;
  }
}

/* ============================================================================
   Stacked-wide scale tier — tablet portrait
   (project-map.json → Layout Mode → scale_tiers; base tier lives in site-base.css)

   The stacked overlay tokens above are phone-tuned: 18-24px side pads and
   full-width copy give a 90+ character measure on a 700-1024px portrait
   canvas. Token bump + editorial measure only — no structural change.
   ============================================================================ */
@media only screen and (orientation: portrait) and (min-width: 700px) and (min-height: 600px) {
  .case-overlay__shell {
    --case-section-pad-y: 40px;
    --case-section-pad-x: clamp(32px, 6vw, 64px);
    --case-grid-gap: 30px;
    --case-media-gap: 20px;
  }

  .case-overlay__hero {
    padding-left: clamp(32px, 6vw, 64px);
    padding-right: clamp(32px, 6vw, 64px);
  }

  /* Story copy: base rule caps at 700px, the stacked block re-opens it to
     100%. Re-cap at an editorial measure; media/galleries stay full-bleed. */
  .case-story__copy {
    max-width: 62ch;
  }
}

/* Reduced motion is a calm, slower profile rather than a frozen popup. Long,
   decorative loops run at 40% speed and large spatial transitions take longer;
   small input feedback remains responsive. Story video autoplay is handled
   separately in JavaScript and stays opt-in under reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html[data-cp-page][data-cp-page] body .case-overlay {
    transition: opacity 480ms ease;
  }

  html[data-cp-page][data-cp-page] body .case-overlay__shell {
    transition: opacity 480ms ease;
  }

  html[data-cp-page][data-cp-page] body .case-overlay.is-closing .case-overlay__shell {
    transform: none;
  }

  .case-overlay__scroll-affordance {
    transition-duration: 550ms, 550ms, 0s;
  }

  .case-story__card[data-hover-highlight="true"]:hover,
  .case-story__device[data-hover-highlight="true"]:hover,
  #cp-lightbox__media-shell {
    --case-hover-ring-angle: 18deg;
    animation: none !important;
  }

  .case-story__watchers-gaze {
    display: none !important;
  }

  .case-story__watchers-pupil {
    --watchers-pupil-dx: 0px !important;
    --watchers-pupil-dy: 0px !important;
    transition: none !important;
  }

  #cp-lightbox__backdrop {
    transition-duration: 700ms;
  }

  #cp-lightbox__frame {
    transition-duration: 750ms, 700ms;
  }

  .case-story__watchers-gaze {
    transition-duration: 1150ms, 0s;
    transition-delay: 0s, 1150ms;
  }

  .case-story__watchers-gaze.is-visible {
    transition-duration: 900ms, 0s;
    transition-delay: 0s, 0s;
  }

  .case-story__watchers-pupil {
    transition-duration: 1300ms, 800ms;
  }

  @media (pointer: coarse), (max-width: 760px) {
    .case-story__watchers-pupil {
      transition: transform 900ms cubic-bezier(.16, .88, .18, 1), opacity 450ms ease;
    }
  }
}

/* A short landscape phone is still a one-column stacked overlay, but its
   viewport can be wide enough to create desktop-length text lines. Reuse the
   tablet editorial measure without importing tablet padding or vertical scale. */
@media only screen and (orientation: landscape) and (max-width: 1023.98px) and (max-height: 599.98px) {
  .case-story__copy {
    max-width: 62ch;
  }
}

/* Direct-entry mobile case exit: keep the standard compact close control at the
   top, and offer a deliberate secondary route back to the full case rail beside
   the story's primary Contact CTA. The footprint stays substantial; hierarchy
   comes from the quieter glass/outline treatment rather than making it tiny. */
.case-story__view-all-cases {
  display: none;
}

@media only screen and (orientation: portrait), only screen and (max-width: 1023.98px), only screen and (max-height: 599.98px) {
  .case-overlay[data-direct-entry="true"] .case-story__cta-wrap--direct-entry-actions {
    width: min(100%, 420px);
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    background: transparent;
    border: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .case-overlay[data-direct-entry="true"] .case-story__cta-wrap--direct-entry-actions > .btn {
    width: 100%;
    justify-content: center;
  }

  .case-overlay[data-direct-entry="true"] .case-story__view-all-cases {
    display: inline-flex;
    height: 3.5em; /* 77.8% of the 4.5em primary Contact CTA */
    min-height: 0;
    padding-inline: 1.75em;
    color: var(--case-scroll-cue-fg);
    background: color-mix(in srgb, var(--case-scroll-cue-fg) 7%, transparent);
    border-width: 1px;
    border-color: color-mix(in srgb, var(--case-scroll-cue-fg) 64%, transparent);
    border-radius: 1em;
    font-weight: 500;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transition: transform 180ms ease, border-color 280ms ease, background 280ms ease, box-shadow 280ms ease;
  }

  .case-overlay[data-direct-entry="true"] .case-story__view-all-cases:hover {
    border-color: color-mix(in srgb, var(--case-scroll-cue-fg) 88%, transparent);
    background: color-mix(in srgb, var(--case-scroll-cue-fg) 11%, transparent);
    box-shadow:
      0 0 22px rgba(85, 240, 255, 0.14),
      0 0 18px rgba(237, 0, 236, 0.10);
    transform: translateY(-1px);
  }

  .case-overlay[data-direct-entry="true"] .case-story__view-all-cases:active {
    transform: translateY(0);
    box-shadow: none;
  }

  .case-overlay[data-direct-entry="true"] .case-story__view-all-cases:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--case-scroll-cue-fg) 72%, transparent);
    outline-offset: 3px;
  }
}


/* Compact footer Dial owns the mobile bottom-right control slot. Retire the
   scroll cue for the duration of that semantic state so the two controls never
   compete for the same corner; normal cue behavior returns with the class. */
@media only screen and (orientation: portrait), only screen and (max-width: 1023.98px), only screen and (max-height: 599.98px) {
  .case-overlay.is-constellation-footer-compact .case-overlay__scroll-affordance,
  .case-overlay.is-constellation-footer-compact .case-overlay__scroll-affordance.is-visible {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition-delay: 0s;
  }
}
