/* Services: a bento of seven cards, each with a small looping scene of the work itself.
   Cards tilt toward the pointer and carry a spotlight that follows it. */
.services { padding-block: clamp(90px, 11vw, 150px); }
.bento { display: grid; gap: 14px; margin-top: 56px; }
@media (min-width: 720px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); } .svc.wide { grid-column: span 2; } }

.svc {
  --mx: 50%; --my: 50%; --tx: 0deg; --ty: 0deg;
  position: relative; overflow: hidden; display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 12px; min-width: 0;
  padding: 26px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.js .svc.in { transform: perspective(1000px) rotateX(var(--tx)) rotateY(var(--ty)); transition: transform 0.5s var(--ease), box-shadow 0.4s, opacity 0.9s var(--ease); }
.svc::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s; background: radial-gradient(460px circle at var(--mx) var(--my), rgba(194, 71, 246, 0.16), transparent 45%); }
.svc:hover::before { opacity: 1; }
.svc:hover { box-shadow: inset 0 0 0 1px rgba(194, 71, 246, 0.35), 0 40px 80px -40px rgba(106, 0, 255, 0.6); }
.svc > * { position: relative; z-index: 1; }
.svc .num { font: 500 12px/1 var(--mono); color: var(--orchid-hi); letter-spacing: 0.1em; }
.svc p { margin: 0; color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tags span { padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 550; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
.viz { position: relative; height: 150px; margin-bottom: 8px; border-radius: 16px; overflow: hidden; background: radial-gradient(120% 120% at 50% 0%, rgba(106, 0, 255, 0.16), transparent 60%), rgba(255, 255, 255, 0.02); box-shadow: inset 0 0 0 1px var(--line); }

/* web: a page assembling itself */
.viz-web { display: grid; place-items: center; }
.win { width: min(78%, 380px); height: 118px; border-radius: 10px; background: rgba(10, 8, 18, 0.9); box-shadow: inset 0 0 0 1px var(--line-2); overflow: hidden; }
.win-bar { display: flex; gap: 4px; padding: 7px 9px; border-bottom: 1px solid var(--line); }
.win-bar i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.blocks { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 22px 34px 14px; gap: 6px; padding: 9px; }
.blocks b { border-radius: 5px; background: rgba(255, 255, 255, 0.08); animation: build 5s var(--ease) infinite; }
.blocks .b1 { grid-column: 1 / -1; background: var(--grad); animation-delay: 0s; }
.blocks .b2 { animation-delay: 0.25s; } .blocks .b3 { animation-delay: 0.5s; background: rgba(194, 71, 246, 0.35); }
.blocks .b4 { animation-delay: 0.75s; } .blocks .b5 { animation-delay: 1s; width: 60%; }
@keyframes build { 0%, 4% { opacity: 0; transform: translateY(10px) scale(0.92); } 14%, 82% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; } }

/* mobile: a feed scrolling under a thumb */
.viz-mobile { display: grid; place-items: center; }
.ph { width: 74px; height: 132px; margin-top: 30px; border-radius: 16px; padding: 6px; background: #0a0812; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14), 0 20px 40px -10px rgba(106, 0, 255, 0.6); overflow: hidden; }
.ph-feed { display: grid; gap: 5px; animation: scrollFeed 4s var(--ease) infinite; }
.ph-feed b { height: 26px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); }
.ph-feed b:nth-child(3n + 1) { background: linear-gradient(120deg, rgba(106, 0, 255, 0.7), rgba(194, 71, 246, 0.6)); }
@keyframes scrollFeed { 0%, 25% { transform: none; } 50%, 75% { transform: translateY(-62px); } 100% { transform: none; } }

/* custom: a system of parts with work flowing between them */
.viz-custom svg { width: 100%; height: 100%; }
.viz-custom .ln { fill: none; stroke: rgba(255, 255, 255, 0.14); stroke-width: 1.2; stroke-dasharray: 3 4; }
.viz-custom .nodes circle { fill: #120e1f; stroke: rgba(194, 71, 246, 0.7); stroke-width: 1.5; }
.viz-custom .nodes .hub { fill: url(#rv); stroke: none; animation: hub 2.4s ease-in-out infinite; transform-origin: 100px 55px; }
.viz-custom .pulse { fill: #fff; filter: drop-shadow(0 0 5px var(--orchid)); }
@keyframes hub { 50% { transform: scale(1.18); } }

/* design: swatches, a frame being drawn, a pointer */
.art { position: absolute; inset: 0; }
.sw { position: absolute; top: 26px; width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 0 3px #0d0b16; }
.sw.s1 { left: 22px; background: var(--violet); } .sw.s2 { left: 40px; background: var(--orchid); } .sw.s3 { left: 58px; background: #ffd1f6; }
.frame { position: absolute; left: 26%; top: 44px; width: 0; height: 0; border-radius: 10px; border: 1.5px dashed rgba(224, 123, 255, 0.85); background: rgba(194, 71, 246, 0.08); animation: frame 4.5s var(--ease) infinite; }
@keyframes frame { 0%, 10% { width: 0; height: 0; opacity: 1; } 45%, 80% { width: 54%; height: 76px; opacity: 1; } 95%, 100% { width: 54%; height: 76px; opacity: 0; } }
.pointer { position: absolute; left: 26%; top: 44px; width: 18px; height: 18px; animation: pointer 4.5s var(--ease) infinite; background: linear-gradient(135deg, #fff 50%, transparent 50%); clip-path: polygon(0 0, 100% 45%, 55% 55%, 40% 100%); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6)); }
@keyframes pointer { 0%, 10% { transform: translate(-4px, -4px); } 45%, 80% { transform: translate(calc(var(--pw, 170px)), 72px); } 100% { transform: translate(-4px, -4px); } }

/* cloud: load rising and falling across a rack, and a deploy landing */
.viz-cloud { display: grid; place-items: end center; padding-bottom: 22px; }
.racks { display: flex; align-items: flex-end; gap: 8px; height: 90px; }
.racks b { width: 18px; height: 100%; border-radius: 5px; background: var(--grad); transform-origin: 50% 100%; transform: scaleY(var(--h)); animation: load 2.6s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -0.4s); box-shadow: 0 0 18px -4px rgba(194, 71, 246, 0.6); }
@keyframes load { to { transform: scaleY(calc(1.15 - var(--h))); } }
.ship { position: absolute; top: 16px; right: 16px; padding: 6px 10px; border-radius: 99px; font: 600 11px/1 var(--mono); color: #0f2a1c; background: #6bffb0; animation: ship 3.2s var(--ease) infinite; }
@keyframes ship { 0%, 15% { opacity: 0; transform: translateY(-8px); } 25%, 75% { opacity: 1; transform: none; } 90%, 100% { opacity: 0; } }

/* integrations: services feeding one system */
.viz-int { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; padding: 18px 12px 16px; }
.hub-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.hub-row span { padding: 7px 11px; border-radius: 99px; font: 600 11.5px/1 var(--body); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line-2); animation: lightUp 5s ease-in-out infinite; }
.hub-row span:nth-child(2) { animation-delay: 1s; } .hub-row span:nth-child(3) { animation-delay: 2s; } .hub-row span:nth-child(4) { animation-delay: 3s; } .hub-row span:nth-child(5) { animation-delay: 4s; }
@keyframes lightUp { 0%, 12%, 100% { box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); } 4% { box-shadow: inset 0 0 0 1px var(--orchid), 0 0 20px -2px var(--orchid); color: #fff; } }
.wire { position: relative; width: 2px; height: 100%; min-height: 30px; background: linear-gradient(var(--line-2), rgba(194, 71, 246, 0.6)); }
.wire i { position: absolute; left: -3px; top: 0; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px var(--orchid); animation: drop 1s ease-in infinite; }
@keyframes drop { to { top: 100%; opacity: 0.2; } }
.core { padding: 9px 16px; border-radius: 12px; font: 650 13px/1 var(--display); color: #fff; background: var(--grad); box-shadow: 0 10px 30px -8px rgba(140, 40, 255, 0.8); }

/* care: a heartbeat on a monitor */
.viz-care svg { position: absolute; inset: 20px 0 30px; width: 100%; height: calc(100% - 50px); }
.beat { fill: none; stroke: var(--orchid-hi); stroke-width: 2; stroke-dasharray: 260; stroke-dashoffset: 260; filter: drop-shadow(0 0 6px var(--orchid)); animation: beatLine 2.4s linear infinite; vector-effect: non-scaling-stroke; }
@keyframes beatLine { to { stroke-dashoffset: -260; } }
.live { position: absolute; left: 16px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1 var(--mono); color: var(--muted); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #6bffb0; box-shadow: 0 0 10px #6bffb0; animation: beat 2s infinite; }
