/* ==========================================================================
   Click On Screens · Use Cases page
   Sits on top of the service pages' design system (solutions/css/styles.css):
   tokens, .wrap, .sec, .sec-head, .panel, .chip, .btn, .cta and .page-hero all
   come from there. Only what is unique to this page is defined here.
   --c is the brand red as an RGB triple, the mega menu's convention. Only the site's own colours here:
   the page does not colour-code industries.
   ========================================================================== */

/* the same arrow circle as the homepage's links */
.icon-circle {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform .4s var(--ease), background-color .25s;
}
.icon-circle svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Hero: an LED wall of the real projects behind the usual page hero ---------- */
.uc-hero { padding-bottom: clamp(28px, 5vh, 48px); }
.uc-wall {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 1fr;
  gap: 5px;
}
/* lighter than the standard hero's scrim: the wall is the point, the copy keeps its contrast from the left and bottom */
.uc-hero::after {
  background:
    linear-gradient(0deg, var(--ink) 0%, rgba(14, 15, 30, .74) 36%, rgba(14, 15, 30, .34) 100%),
    linear-gradient(90deg, rgba(14, 15, 30, .72) 0%, rgba(14, 15, 30, .1) 58%, rgba(14, 15, 30, .4) 100%);
}
.uc-wall img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
/* each swap is instant, like a panel refreshing: a quick flare instead of a crossfade */
.uc-wall img.is-flash { animation: uc-flare .7s ease-out; }
@keyframes uc-flare {
  from { filter: brightness(2.1) saturate(1.2); }
  to { filter: none; }
}
/* the LED pitch: fine dots of the page colour laid over the photographs */
.uc-wall::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 1.5px, rgba(14, 15, 30, .62) 2.1px) 0 0 / 5px 5px;
  pointer-events: none;
}
.uc-hero .crumbs { margin-bottom: 18px; }

/* the scoreboard */
.uc-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: clamp(32px, 6vh, 56px) 0 0;
  padding-top: clamp(20px, 3vh, 28px);
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.uc-stats > div { display: grid; gap: 4px; }
.uc-stats dt { order: 2; font-size: 13px; line-height: 20px; color: rgba(255, 255, 255, .72); }
.uc-stats dd { order: 1; margin: 0; font: 400 clamp(30px, 3.1vw, 44px)/1.1 "Geist", sans-serif; letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.uc-stats dd small { font: 500 .5em/1 "Pixelify Sans", monospace; letter-spacing: 0; color: var(--accent); margin-left: .2em; }

/* ---------- Filters ---------- */
.uc-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: clamp(20px, 2.4vw, 28px) 0; }
.uc-filters .chip svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.uc-filters .chip b { font-weight: 500; font-size: 13px; color: var(--fg-3); margin-left: 2px; font-variant-numeric: tabular-nums; }
.uc-filters .chip[aria-pressed="true"] { border-color: var(--accent); color: #fff; background: var(--accent); }
.uc-filters .chip[aria-pressed="true"] b { color: #fff; }

/* ---------- The gallery: a bento that resolves to a clean rectangle when unfiltered ---------- */
.uc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(190px, min(18.6vw, (100svh - 340px) / 2), 272px);   /* the heading, filters and first two rows fit one screen */
  grid-auto-flow: dense;
  gap: 14px;
}
.uc-tile {
  --c: 220, 79, 53;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(var(--c), .34);
  background: var(--surface);
  color: #fff;
  transition: border-color .25s, translate .4s var(--ease), box-shadow .3s;
}
.uc-tile[hidden] { display: none; }
.uc-tile--lg { grid-column: span 2; grid-row: span 2; }
.uc-tile--tall { grid-row: span 2; }
.uc-tile--wide { grid-column: span 2; }
.uc-tile--full { grid-column: 1 / -1; }
.uc-tile > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  transition: scale 1.2s var(--ease);
}
.uc-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(14, 15, 30, .97) 0%, rgba(14, 15, 30, .86) 36%, rgba(14, 15, 30, .42) 62%, rgba(14, 15, 30, 0) 84%);
}
/* the larger tiles need less of it: their text takes up less of the height */
.uc-tile--lg::before,
.uc-tile--tall::before { background: linear-gradient(0deg, rgba(14, 15, 30, .96) 0%, rgba(14, 15, 30, .72) 22%, rgba(14, 15, 30, 0) 48%); }
.uc-tile--full::before { background: linear-gradient(0deg, rgba(14, 15, 30, .96) 0%, rgba(14, 15, 30, .8) 34%, rgba(14, 15, 30, 0) 66%); }
/* powers on as it scrolls in: the photo comes up through a grid of LEDs */
.uc-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 50% 50%, transparent 1.6px, var(--ink) 2.5px) 0 0 / 6px 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.1s var(--ease) .15s;
}
.js .uc-tile.rv:not(.in)::after { opacity: 1; }
.uc-tile:hover,
.uc-tile:focus-visible { border-color: rgba(var(--c), .85); translate: 0 -3px; box-shadow: 0 18px 36px -18px rgba(var(--c), .7); }
.uc-tile:hover > img,
.uc-tile:focus-visible > img { scale: 1.04; }
.uc-tile:hover .icon-circle,
.uc-tile:focus-visible .icon-circle { transform: rotate(45deg); background: #e8624a; }

.uc-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; line-height: 16px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .86); }
.uc-tag i { width: 9px; height: 9px; border-radius: 2px; background: rgb(var(--c)); flex: none; }
.uc-tile h3 { margin: 7px 0 0; font-family: "Geist", sans-serif; font-size: 18px; font-weight: 400; line-height: 1.25; letter-spacing: -.01em; }
.uc-tile--lg h3 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -.02em; }
.uc-tile--full h3 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -.02em; }
.uc-tile__sub { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: rgba(255, 255, 255, .8); }
.uc-tile__go { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; line-height: 20px; }

/* the invitation closes the bento */
.uc-tile--cta {
  justify-content: center;
  border-color: var(--accent);
  background: var(--accent);
  grid-column: span var(--rest, 3);
}
.uc-tile--cta::before { display: none; }
.uc-tile--cta h3 { margin: 0; font-size: clamp(22px, 2vw, 28px); letter-spacing: -.02em; }
.uc-tile--cta .uc-tile__sub { color: rgba(255, 255, 255, .92); }
.uc-tile--cta .icon-circle,
.uc-tile--cta:hover .icon-circle,
.uc-tile--cta:focus-visible .icon-circle { background: #fff; }
.uc-tile--cta .icon-circle svg { stroke: var(--accent); }

/* filtered: the bento gives way to an even grid, and the invitation fills what is left of the last row */
.uc-grid.is-filtered { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(240px, 22vw, 320px); }
.uc-grid.is-filtered .uc-tile:not(.uc-tile--cta) { grid-column: auto; grid-row: auto; }
.uc-grid.is-filtered .uc-tile:not(.uc-tile--cta) h3 { font-size: 20px; letter-spacing: -.01em; }
.uc-grid.is-filtered .uc-tile:not(.uc-tile--cta)::before { background: linear-gradient(0deg, rgba(14, 15, 30, .97) 0%, rgba(14, 15, 30, .86) 36%, rgba(14, 15, 30, .42) 62%, rgba(14, 15, 30, 0) 84%); }

::view-transition-group(*) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .7, .1, 1); }
@media (prefers-reduced-motion: reduce) { .uc-wall img.is-flash { animation: none; } }

/* ---------- Case studies: a list without scripts, a dialog with them ---------- */
.js .uc-cases { display: none; }
.uc-cases { padding-bottom: var(--section); }
.uc-cases .case + .case { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--line); }
.case {
  --c: 220, 79, 53;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(20px, 2.6vw, 36px);
  align-items: start;
}
.case__stage {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: #0a0a14;
}
.case__stage img,
.case__stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.case__thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.case__thumbs button {
  display: block;
  width: 76px; height: 57px;
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: #0a0a14;
  cursor: pointer;
  opacity: .62;
  transition: opacity .2s, border-color .2s;
}
.case__thumbs button:hover { opacity: 1; }
.case__thumbs button[aria-pressed="true"] { opacity: 1; border-color: rgb(var(--c)); }
.case__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.case__body { display: grid; justify-items: start; gap: 10px; }
.case .uc-tag { color: var(--fg-2); }
.case__body h2 { margin: 2px 0 0; }
.case__headline { font-family: "Geist", sans-serif; font-size: 18px; line-height: 26px; color: var(--fg); letter-spacing: -.01em; }
.case__spec { width: 100%; margin: 8px 0 0; border-top: 1px solid var(--line); }
.case__spec > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 21px; }
.case__spec dt { color: var(--fg-3); }
.case__spec dd { margin: 0; color: var(--fg); overflow-wrap: anywhere; }
.case__scale { width: 100%; margin-top: 6px; }
.case__scale p { margin-bottom: 10px; font-size: 13px; line-height: 20px; color: var(--fg-3); }
.case__scale-row { display: flex; align-items: flex-end; gap: 12px; padding-bottom: 6px; border-bottom: 2px solid var(--line-2); }
.case .btn { margin-top: 8px; }
.case__note { font-size: 12px; line-height: 18px; color: var(--fg-3); }

.uc-dialog {
  margin: auto;
  width: min(1240px, 100% - 32px);
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--surface) 0%, #121326 100%);
  color: var(--fg);
}
.uc-dialog[open] { display: flex; flex-direction: column; animation: uc-dialog-in .45s var(--ease); }
.uc-dialog::backdrop { background: rgba(9, 16, 38, .78); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
@keyframes uc-dialog-in {
  from { opacity: 0; translate: 0 18px; scale: .985; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}
html:has(.uc-dialog[open]) { overflow: hidden; }
.uc-dialog__bar { flex: none; }
.uc-dialog__pos { font: 500 15px/1 "Pixelify Sans", monospace; color: var(--accent); letter-spacing: .04em; }
.uc-dialog__pos span { color: var(--fg-3); }
.uc-dialog__ctrl { display: flex; align-items: center; gap: 8px; }
.uc-dialog__ctrl button {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.uc-dialog__ctrl button:hover { background: var(--hover-bg); border-color: rgba(255, 255, 255, .34); }
.uc-dialog__ctrl svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.uc-dialog__slot { flex: 1 1 auto; min-height: 0; padding: clamp(16px, 2vw, 24px); overflow-y: auto; overscroll-behavior: contain; }

/* ---------- To scale: every drawing shares one unit, --u (px per metre) ---------- */
.uc-bar {
  --led: rgba(255, 255, 255, .3);
  display: block;
  flex: none;
  width: calc(var(--w) * var(--u));
  height: max(2px, calc(var(--h) * var(--u)));
  border-radius: 1px;
  background: radial-gradient(circle at 50% 50%, var(--led) 1px, transparent 1.4px) 0 0 / 4px 4px, #17181f;
}
.case__scale .uc-bar { --led: rgb(var(--c)); }
.uc-person { display: block; flex: none; width: auto; height: calc(1.75 * var(--u)); fill: var(--fg-3); }

.scale { overflow: hidden; margin-top: clamp(28px, 3.4vw, 44px); }
.scale__readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 20px;
  min-height: 56px;
  padding: 12px 20px;
  background: var(--ink);
  color: #fff;
}
.scale__name { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; line-height: 20px; }
.scale__name i { width: 10px; height: 10px; border-radius: 2px; background: var(--accent); flex: none; }
.scale__size { font: 400 18px/1.1 "Geist", sans-serif; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
/* phones scroll sideways along the ribbon rather than shrink it out of reach */
.scale__view { overflow-x: auto; overscroll-behavior-x: contain; }
.scale__view:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; }
.scale__track {
  container-type: inline-size;
  min-width: 920px;
  padding: clamp(24px, 3vw, 36px) clamp(20px, 2.6vw, 36px) 22px;
}
.scale__draw { --u: calc(100cqw / 57); }
.scale .uc-bar { position: relative; transition: outline-color .2s; outline: 2px solid transparent; outline-offset: 2px; }
.scale a.uc-bar::before { content: ""; position: absolute; inset: -14px -3px; }   /* a comfortable target for the slimmer screens */
.scale a.uc-bar { --led: rgba(255, 255, 255, .62); }
.scale a.uc-bar:hover,
.scale a.uc-bar:focus-visible,
.scale a.uc-bar.is-on { --led: var(--accent); outline-color: var(--accent); }
.scale__ribbon { width: 100%; margin-bottom: clamp(30px, 3.4vw, 46px); }
.scale__floor { display: flex; align-items: flex-end; justify-content: space-between; padding-bottom: 8px; border-bottom: 2px solid var(--line-2); }
.scale__ruler { position: relative; height: 26px; margin-top: 6px; font-size: 12px; line-height: 1; color: var(--fg-3); }
.scale__ruler span { position: absolute; top: 6px; white-space: nowrap; }
.scale__ruler span::before { content: ""; position: absolute; left: 0; top: -12px; width: 1px; height: 6px; background: var(--line-2); }
.scale__ruler span:last-child { translate: -100% 0; color: var(--accent-text); }
.scale__ruler span:last-child::before { left: 100%; }
.scale__hint { display: none; padding: 0 20px 14px; font-size: 13px; line-height: 20px; color: var(--fg-3); }
.scale__note { margin-top: 14px; text-align: center; font-size: 13px; line-height: 20px; color: var(--fg-3); }

/* ---------- Responsive, on the service pages' breakpoints ---------- */
@media (max-width: 1100px) {
  .uc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(200px, 30vw, 300px); }
  .uc-grid.is-filtered { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(200px, 30vw, 300px); }
  .uc-tile--tall { grid-row: span 2; }
  .uc-tile__sub { font-size: 13px; line-height: 18px; }
}
@media (max-width: 1000px) { .scale__hint { display: block; } }
@media (max-width: 900px) {
  .uc-wall { grid-template-columns: repeat(4, 1fr); }
  /* the copy runs the full width here, so the scrim does more of the work */
  .uc-hero::after { background: linear-gradient(0deg, var(--ink) 0%, rgba(14, 15, 30, .86) 55%, rgba(14, 15, 30, .62) 100%); }
  .uc-hero .hero-aside { text-align: left; justify-self: start; }
  .uc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
  .case { grid-template-columns: minmax(0, 1fr); }
}
/* Phones only: "Every Screen, To Scale." is left out */
@media (max-width: 760px) { #to-scale { display: none; } }
@media (max-width: 640px) {
  .uc-wall { grid-template-columns: repeat(3, 1fr); }
  .uc-grid, .uc-grid.is-filtered { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .uc-tile, .uc-tile--lg, .uc-tile--tall, .uc-tile--wide, .uc-tile--full { grid-column: auto; grid-row: auto; min-height: 260px; }
  .uc-tile--cta { grid-column: auto; min-height: 180px; }
  .uc-dialog { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
  .case__spec > div { grid-template-columns: 96px minmax(0, 1fr); }
}

/* ---------- Video case studies ---------- */
.case__stage:has(video) { aspect-ratio: 16 / 9; }
.case__stage video { background: #000; }
.uc-tile__play {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 8px; border-radius: 999px;
  background: rgba(14, 15, 30, .72); border: 1px solid rgba(255, 255, 255, .25);
  font-size: 12px; line-height: 16px; letter-spacing: .02em;
}
.uc-tile__play svg { width: 12px; height: 12px; fill: #fff; }
