NowAI-Bench / style.css
bradnow's picture
Polish leaderboard cards: clickable titles, tooltips, hover animation
ea1199a
/* ServiceNow Sans — Text weights */
@font-face {
font-family: 'ServiceNow Sans';
src: url('https://www.servicenow.com/etc.clientlibs/ds/clientlibs/clientlib-arc-commons/resources/fonts/ServiceNowSans-Light.woff2') format('woff2');
font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
font-family: 'ServiceNow Sans';
src: url('https://www.servicenow.com/etc.clientlibs/ds/clientlibs/clientlib-arc-commons/resources/fonts/ServiceNowSans-Regular.woff2') format('woff2');
font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
font-family: 'ServiceNow Sans';
src: url('https://www.servicenow.com/etc.clientlibs/ds/clientlibs/clientlib-arc-commons/resources/fonts/ServiceNowSans-Medium.woff2') format('woff2');
font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
font-family: 'ServiceNow Sans';
src: url('https://www.servicenow.com/etc.clientlibs/ds/clientlibs/clientlib-arc-commons/resources/fonts/ServiceNowSans-Bold.woff2') format('woff2');
font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
font-family: 'ServiceNow Sans Mono';
src: url('https://www.servicenow.com/etc.clientlibs/ds/clientlibs/clientlib-arc-commons/resources/fonts/ServiceNowSansMono-Regular.woff2') format('woff2');
font-weight: 400; font-style: normal; font-display: swap;
}
body {
background-color: #faf9fb;
color: #1a1c1d;
-webkit-font-smoothing: antialiased;
}
.accent-indigo { border-left-color: #7661FF; }
.accent-blue { border-left-color: #52B8FF; }
.accent-infinite { border-left-color: #032D42; }
.bg-indigo-soft { background-color: rgba(118, 97, 255, 0.1); }
.bg-blue-soft { background-color: rgba(82, 184, 255, 0.1); }
.bg-infinite-soft { background-color: rgba(3, 45, 66, 0.05); }
.fill-indigo { background-color: #7661FF; }
.fill-blue { background-color: #52B8FF; }
.fill-infinite { background-color: #032D42; }
.card-shadow {
box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.02);
transition: box-shadow 0.25s ease, transform 0.2s ease;
}
.card-shadow:hover {
box-shadow: 0 10px 15px -3px rgba(3, 45, 66, 0.08), 0 4px 6px -2px rgba(3, 45, 66, 0.04);
}
/* Watermark pixelated wave animation */
@keyframes pixel-wave {
0%, 100% { opacity: 0.6; }
50% { opacity: 1; }
}
.wave-1 { animation: pixel-wave 5.2s infinite ease-in-out; animation-delay: 0s; }
.wave-2 { animation: pixel-wave 5.2s infinite ease-in-out; animation-delay: 0.52s; }
.wave-3 { animation: pixel-wave 5.2s infinite ease-in-out; animation-delay: 1.04s; }
.wave-4 { animation: pixel-wave 5.2s infinite ease-in-out; animation-delay: 1.56s; }
.wave-5 { animation: pixel-wave 5.2s infinite ease-in-out; animation-delay: 2.08s; }
.watermark-container {
mask-image: linear-gradient(to bottom right, black 20%, transparent 80%);
-webkit-mask-image: linear-gradient(to bottom right, black 20%, transparent 80%);
}
@media (prefers-reduced-motion: reduce) {
.wave-1, .wave-2, .wave-3, .wave-4, .wave-5 {
animation: none;
opacity: 1;
}
}
/* Title hover — rests infinite-blue, sweeps logo colors L→R, settles deep blue.
Reverses smoothly on mouse-leave. Fires on keyboard focus too. */
.title-anim {
background-image: linear-gradient(90deg,
#032D42 0%, #032D42 30%,
#7661FF 42%, #63DF4E 52%, #52B8FF 60%,
#006DAA 70%, #006DAA 100%);
background-size: 320% 100%;
background-position: 0 0;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
-webkit-text-fill-color: transparent;
transition: background-position 0.5s ease;
}
.title-anim:hover,
.title-anim:focus-visible {
animation: title-sweep 0.9s ease forwards;
}
@keyframes title-sweep {
from { background-position: 0 0; }
to { background-position: 100% 0; }
}
@media (prefers-reduced-motion: reduce) {
.title-anim { transition: none; }
.title-anim:hover,
.title-anim:focus-visible {
animation: none;
color: #006DAA;
-webkit-text-fill-color: #006DAA;
}
}
/* Accessible tooltip — shows on hover and keyboard focus */
.tooltip {
position: relative;
display: inline-flex;
align-items: center;
}
.tooltip-trigger {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0;
border: 0;
background: none;
color: #5b6b75;
cursor: help;
line-height: 0;
border-radius: 9999px;
transition: color 0.15s ease;
}
.tooltip-trigger:hover,
.tooltip:focus-within .tooltip-trigger {
color: #032D42;
}
.tooltip-trigger:focus-visible {
outline: 2px solid #7661FF;
outline-offset: 2px;
}
.tooltip-bubble {
position: absolute;
bottom: calc(100% + 8px);
left: 50%;
transform: translateX(-50%);
z-index: 30;
width: max-content;
max-width: 240px;
padding: 8px 10px;
border-radius: 8px;
background: #032D42;
color: #ffffff;
font-size: 12px;
font-weight: 400;
line-height: 1.45;
text-transform: none;
letter-spacing: normal;
box-shadow: 0 6px 16px rgba(3, 45, 66, 0.18);
opacity: 0;
visibility: hidden;
pointer-events: none;
transition: opacity 0.15s ease;
}
.tooltip-bubble::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: 5px solid transparent;
border-top-color: #032D42;
}
.tooltip:hover .tooltip-bubble,
.tooltip:focus-within .tooltip-bubble {
opacity: 1;
visibility: visible;
}
@media (prefers-reduced-motion: reduce) {
.tooltip-bubble { transition: none; }
}