/* Home workflows: Plan, Respond, Learn. Each card is a dark glass module keyed
   to its plate's hue. The plate runs edge to edge across the top of the card
   and dissolves into it; js/home-workflows.js drives the animation. Cards and
   plates follow the theme like the principles stage: dark glass as painted,
   raised paper in light (the script swaps the plate palette to match).
   The plate takes the card's first subgrid row, so titles, copy, points and
   tags stay level across the three cards. */

/* ---------- module */
.use-case-list[data-workflows] article {
  --hue: 34 211 183;
  --text: #f0ede5; --muted: #a3a097; --faint: #8a877f;
  --line: rgb(240 237 229 / .08); --line-2: rgb(240 237 229 / .15);
  color: var(--text); color-scheme: dark;
  padding: 0 20px 20px; border: 0; border-radius: 4px;
  background: #0c0b09;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 30px 60px -32px rgb(0 0 0 / .85);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.use-case-list[data-workflows] article:nth-child(2) { --hue: 123 194 243; }
.use-case-list[data-workflows] article:nth-child(3) { --hue: 189 172 243; }
.use-case-list[data-workflows] article:hover {
  transform: translateY(-4px);
  box-shadow: 0 44px 80px -36px rgb(0 0 0 / .9), 0 0 64px -30px rgb(var(--hue) / .35);
}
/* a 1px edge that catches the plate's light at the top and falls away below */
.use-case-list[data-workflows] article::before {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; padding: 1px;
  background: linear-gradient(180deg, rgb(var(--hue) / .55), rgb(240 237 229 / .16) 28%, rgb(240 237 229 / .05) 72%, rgb(240 237 229 / .1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .75; transition: opacity .45s var(--ease);
}
.use-case-list[data-workflows] article:hover::before { opacity: 1; }
/* light spilling from the plate onto the glass beneath it */
.use-case-list[data-workflows] article::after {
  inset: 0; z-index: -1; opacity: .8;
  background: radial-gradient(70% 22% at 50% 40%, rgb(var(--hue) / .09), transparent 72%);
  transition: opacity .45s var(--ease);
}
.use-case-list[data-workflows] article:hover::after { opacity: 1; }

[data-theme='light'] .use-case-list[data-workflows] article {
  --hue: 10 122 107;
  --text: #0c0b09; --muted: #55534d; --faint: #67645e;
  --line: rgb(12 11 9 / .08); --line-2: rgb(12 11 9 / .14);
  color-scheme: only light; background: #fbfaf7;
  box-shadow: 0 30px 60px -36px rgb(40 30 10 / .3), 0 0 0 1px rgb(12 11 9 / .05);
}
[data-theme='light'] .use-case-list[data-workflows] article:nth-child(2) { --hue: 36 104 163; }
[data-theme='light'] .use-case-list[data-workflows] article:nth-child(3) { --hue: 108 84 170; }
[data-theme='light'] .use-case-list[data-workflows] article:hover {
  box-shadow: 0 44px 80px -40px rgb(40 30 10 / .36), 0 0 0 1px rgb(12 11 9 / .05), 0 0 64px -30px rgb(var(--hue) / .3);
}
[data-theme='light'] .use-case-list[data-workflows] article::before {
  background: linear-gradient(180deg, rgb(var(--hue) / .5), rgb(12 11 9 / .12) 28%, rgb(12 11 9 / .05) 72%, rgb(12 11 9 / .09));
}
[data-theme='light'] .use-case-list[data-workflows] article::after {
  background: radial-gradient(70% 22% at 50% 40%, rgb(var(--hue) / .07), transparent 72%);
}

/* ---------- copy, points, tags */
.use-case-list[data-workflows] h3 { margin: 0 0 8px; font-size: 21px; font-weight: 500; letter-spacing: -.035em; line-height: 1.15; }
.use-case-list[data-workflows] article > p { margin-bottom: 18px; color: #b6b2a9 !important; font-size: 13px; line-height: 1.6; }
.use-case-list[data-workflows] .use-case-points {
  margin-bottom: 18px; border-top: 0; font-size: 13px;
  background: linear-gradient(90deg, rgb(240 237 229 / .15), rgb(240 237 229 / .03)) 0 0 / 100% 1px no-repeat;
}
.use-case-list[data-workflows] .use-case-points li {
  gap: 12px; min-height: 33px; border-bottom: 0; color: #d6d3cb; letter-spacing: -.005em;
  background: linear-gradient(90deg, rgb(240 237 229 / .09), rgb(240 237 229 / .015)) 0 100% / 100% 1px no-repeat;
}
.use-case-list[data-workflows] .use-case-point-icon { stroke: rgb(var(--hue)); stroke-width: 1.3; }
.use-case-list[data-workflows] .use-case-tags { gap: 6px; }
.use-case-list[data-workflows] .use-case-tags li {
  padding: 6px 9px; border-radius: 3px;
  font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #a3a097;
  background: rgb(240 237 229 / .05); box-shadow: none;
}
[data-theme='light'] .use-case-list[data-workflows] article > p { color: #4a4843 !important; }
[data-theme='light'] .use-case-list[data-workflows] .use-case-points {
  background: linear-gradient(90deg, rgb(12 11 9 / .14), rgb(12 11 9 / .03)) 0 0 / 100% 1px no-repeat;
}
[data-theme='light'] .use-case-list[data-workflows] .use-case-points li {
  color: #2a2926;
  background: linear-gradient(90deg, rgb(12 11 9 / .08), rgb(12 11 9 / .015)) 0 100% / 100% 1px no-repeat;
}
[data-theme='light'] .use-case-list[data-workflows] .use-case-tags li { color: #55534d; background: rgb(12 11 9 / .045); }

/* ---------- plate */
.use-case-viz {
  --hue: 34 211 183;
  position: relative; isolation: isolate; overflow: hidden; container-type: inline-size;
  aspect-ratio: 16 / 9; min-height: 148px; margin: 0 0 16px;
  /* A grid item with an aspect ratio is not stretched by default: it took its width from the
     min-height (148px x 16/9 = 263px), so in the three-up grid at 701-960px the plate ran past
     its card and the card cut off the status label ("UNSORT"). Stretched, it fills the card. */
  justify-self: stretch;
  border-radius: 2px; background: #08080a; color-scheme: dark; touch-action: pan-y;
  box-shadow: inset 0 0 0 1px rgb(240 237 229 / .1);
}
.use-case-viz[data-flow-viz='respond'] { --hue: 123 194 243; }
.use-case-viz[data-flow-viz='learn'] { --hue: 189 172 243; }
[data-theme='light'] .use-case-viz { --hue: 10 122 107; background: #f7f5f0; color-scheme: only light; box-shadow: inset 0 0 0 1px rgb(12 11 9 / .08); }
[data-theme='light'] .use-case-viz[data-flow-viz='respond'] { --hue: 36 104 163; }
[data-theme='light'] .use-case-viz[data-flow-viz='learn'] { --hue: 108 84 170; }
/* inside a card the plate runs edge to edge and dissolves into the glass */
.use-case-list[data-workflows] .use-case-viz {
  margin: 0 -20px 20px; border-radius: 0; box-shadow: none;
  -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent);
  mask-image: linear-gradient(180deg, #000 78%, transparent);
}
.use-case-viz::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .75; transition: opacity .6s var(--ease);
  background: radial-gradient(70% 80% at 50% 52%, rgb(var(--hue) / .1), transparent 70%), linear-gradient(90deg, rgb(240 237 229 / .028) 1px, transparent 1px) 0 0 / calc(100% / 12) 100%;
}
[data-theme='light'] .use-case-list[data-workflows] .use-case-viz { box-shadow: none; }
[data-theme='light'] .use-case-viz::before {
  background: radial-gradient(70% 80% at 50% 52%, rgb(var(--hue) / .07), transparent 70%), linear-gradient(90deg, rgb(12 11 9 / .035) 1px, transparent 1px) 0 0 / calc(100% / 12) 100%;
}
.use-case-list article:hover .use-case-viz::before { opacity: 1; }
.use-case-viz::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(130% 100% at 50% 40%, transparent 58%, rgb(9 8 7 / .55));
}
[data-theme='light'] .use-case-viz::after { background: radial-gradient(130% 100% at 50% 40%, transparent 58%, rgb(247 245 240 / .6)); }
.use-case-viz canvas { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; }
.use-case-viz__meta {
  position: absolute; z-index: 3; top: 14px; left: 20px; right: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; color: #8a877f; pointer-events: none;
}
.use-case-viz__meta b { margin-right: 7px; font-weight: 400; color: rgb(var(--hue)); }
.use-case-viz__meta > span:last-child { display: inline-flex; align-items: center; gap: 7px; color: #a3a097; }
.use-case-viz__meta i { width: 5px; height: 5px; background: rgb(var(--hue)); box-shadow: 0 0 0 3px rgb(var(--hue) / .16); animation: flow-blink 2.4s ease-in-out infinite; }
[data-flow-phase] { display: inline-block; }
[data-flow-phase].is-new { animation: flow-phase .7s var(--ease); }
[data-theme='light'] .use-case-viz__meta { color: #67645e; }
[data-theme='light'] .use-case-viz__meta > span:last-child { color: #55534d; }
@keyframes flow-blink { 50% { opacity: .35; } }
@keyframes flow-phase { from { opacity: 0; transform: translateY(3px); } }
@container (max-width: 250px) { .use-case-viz__meta > span:last-child { display: none; } }
