/* layered CSS 3D extrusion of the Limitless shield */
.shield3d { --w: 140px; --h: calc(var(--w) * 1.069); --depth: 0.72px; position: relative; width: var(--w); height: var(--h); margin: 0 0 26px; perspective: 900px; perspective-origin: 50% 40%; }
.s-sway, .s-spin { position: absolute; inset: 0; transform-style: preserve-3d; }
.s-sway { transform: rotateX(var(--py, 0deg)) rotateY(var(--px, 0deg)); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.sl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; backface-visibility: visible; -webkit-user-drag: none; }
/* edge layers: darkened chrome slices stacked behind the face, ice-blue tint toward the back */
.sl.edge { transform: translateZ(calc(var(--z) * var(--depth) * -1)); -webkit-mask: url(/assets/logo-3d.webp) center / 100% 100% no-repeat; mask: url(/assets/logo-3d.webp) center / 100% 100% no-repeat;
  background: linear-gradient(100deg, #4a525b 0%, #dfe5ea 28%, #f7fafc 36%, #8b949d 55%, #c9d0d6 72%, #3c434a 100%); }
.sl.edge:nth-child(n+30) { background: linear-gradient(100deg, #0d3a52, #58C7FF 40%, #1b5f80 75%, #0a2636); }
.sl.back { transform: translateZ(calc(-37 * var(--depth))) rotateY(180deg); background: radial-gradient(120% 90% at 30% 20%, #2a3f4d, #0b1218 60%, #05080b); -webkit-mask: url(/assets/logo-3d.webp) center / 100% 100% no-repeat; mask: url(/assets/logo-3d.webp) center / 100% 100% no-repeat; }
.sl.face { transform: translateZ(1px); }
.sl.edge, .sl.face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.sl.back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
/* specular sweep, clipped to the shield silhouette */
.s-sheen { position: absolute; inset: 0; transform: translateZ(1.6px); pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.0) 38%, rgba(255,255,255,.75) 47%, rgba(88,199,255,.55) 52%, transparent 62%) no-repeat;
  background-size: 260% 100%; background-position: 140% 0;
  -webkit-mask: url(/assets/logo-3d.webp) center / 100% 100% no-repeat; mask: url(/assets/logo-3d.webp) center / 100% 100% no-repeat; opacity: 0; }
.s-glow { position: absolute; inset: -18%; border-radius: 50%; background: radial-gradient(closest-side, rgba(88,199,255,.38), rgba(88,199,255,.10) 55%, transparent 75%); filter: blur(8px); opacity: .9; transform: translateZ(-40px); }
.s-floor { position: absolute; left: 10%; right: 10%; bottom: -14px; height: 12px; border-radius: 50%; background: radial-gradient(closest-side, rgba(88,199,255,.35), transparent); filter: blur(3px); }

/* The resting state above is the final, front-facing badge, so the shield is always visible even if the intro never runs.
   js/shield3d.js adds .s-play only once the tab is actually visible and painting, then finishes it if the timeline stalls. */
@media (prefers-reduced-motion: no-preference) {
  .shield3d.s-play .s-spin { animation: s-in 2.3s cubic-bezier(.45,.05,.2,1) both, s-idle 7s ease-in-out 2.4s infinite; }
  .shield3d.s-play .s-sheen { animation: s-sheen 1.1s ease-out 1.25s both; }
  .shield3d.s-play { animation: s-fade .35s ease-out both; }
  .shield3d.s-play .s-glow { animation: s-glow 2.2s ease-out both; }
  .shield3d.s-play .s-floor { animation: s-floor 2.2s ease-out both; }
}
@keyframes s-in {
  0%   { transform: translateY(18px) scale(.82) rotateX(18deg) rotateY(-120deg); }
  62%  { transform: translateY(-2px) scale(1.02) rotateX(-4deg) rotateY(14deg); }
  82%  { transform: translateY(0) scale(1) rotateX(1deg) rotateY(-4deg); }
  100% { transform: translateY(0) scale(1) rotateX(0deg) rotateY(0deg); }
}
@keyframes s-idle { 0%, 100% { transform: rotateY(0deg) rotateX(0deg); } 30% { transform: rotateY(9deg) rotateX(2deg); } 70% { transform: rotateY(-9deg) rotateX(-1deg); } }
@keyframes s-sheen { 0% { opacity: 0; background-position: 140% 0; } 15% { opacity: 1; } 100% { opacity: 0; background-position: -40% 0; } }
@keyframes s-glow { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; } 100% { opacity: .9; transform: scale(1); } }
@keyframes s-floor { 0% { opacity: 0; } 100% { opacity: 1; } }
@media (max-width: 899px) { .shield3d { --w: 84px; margin-bottom: 18px; } }
@keyframes s-fade { from { opacity: 0; } to { opacity: 1; } }
/* lighter on phones: half the edge slices, same total depth */
@media (max-width: 899px) { .shield3d { --depth: 0.72px; } .sl.edge:nth-child(odd) { display: none; } }
/* short laptop screens: smaller badge so the whole hero still fits */
@media (min-width: 960px) and (max-height: 860px) { .shield3d { --w: 112px; margin-bottom: 18px; } }
@media (min-width: 960px) and (max-height: 680px) { .shield3d { --w: 84px; margin-bottom: 12px; } }
