/* Keystone Call Co home page: glass objects and interactive motion (owner request, 2026-11-08).
   Loaded only by the home page, after site.css. Every element styled here except the glass cards is added by
   motion.js and hidden from screen readers, so the page reads the same without JavaScript. Cool sapphire palette
   from the Meridian Glass design (evening + sapphire): #2563eb, #60a5fa, #1d4ed8, ink #93c5fd.
   Reduced motion: site.css cuts every animation and transition, and motion.js moves nothing. */

/* ── Glass header over the page ── */
.home .site-header, .home .site-header.is-scrolled {
  background: rgba(7, 18, 38, .58);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border-bottom-color: rgba(147, 197, 253, .14);
}

/* ── Hero: the canvas of glass objects, and a light that follows the pointer ── */
.glass-field { position: absolute; inset: 0; z-index: -1; display: block; pointer-events: none; }
/* the objects stay faint behind the headline and copy, and come forward on the open side */
@media (min-width: 960px) {
  .glass-field { -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, .32) 44%, #000 62%); mask-image: linear-gradient(90deg, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, .32) 44%, #000 62%); }
}
@media (max-width: 959px) {
  .glass-field { -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, .35) 50%, #000 70%); mask-image: linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, .35) 50%, #000 70%); }
}
.home .hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .6s ease;
  background: radial-gradient(28rem 28rem at var(--mx, 70%) var(--my, 30%), rgba(96, 165, 250, .16), transparent 70%);
}
.home .hero.is-lit::after { opacity: 1; }

/* ── Glass cards (these style real content, so they also apply without JavaScript) ── */
.home .principle {
  position: relative; padding: 24px 26px; border: 1px solid rgba(147, 197, 253, .18); border-top: 2px solid var(--sky); border-radius: 18px;
  background: linear-gradient(160deg, rgba(96, 165, 250, .12), rgba(11, 27, 51, .45) 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 50px -30px rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
}
.home .web-card { position: relative; }
.home .service-list > div { position: relative; border-radius: 14px; transition: background-color .35s ease, padding .35s ease, box-shadow .35s ease; }
@media (hover: hover) {
  .home .service-list > div:hover { padding-left: 16px; padding-right: 16px; background: rgba(96, 165, 250, .07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 0 1px rgba(147, 197, 253, .16); }
}

/* ── Tilting glass with light that follows the pointer (desktop pointers only; classes added by motion.js) ── */
.motion-ready .tilt {
  position: relative; transform-style: preserve-3d; will-change: transform;
  transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1), border-color .3s ease, box-shadow .45s ease;
}
.motion-ready .tilt.is-tilting { transition-duration: .8s, .14s, .3s, .45s; box-shadow: 0 34px 70px -28px rgba(0, 0, 0, .75), 0 0 46px rgba(37, 99, 235, .22), inset 0 1px 0 rgba(255, 255, 255, .1); }
.tilt > .glare {
  position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .45s ease;
  background: radial-gradient(22rem 22rem at var(--gx, 50%) var(--gy, 0%), rgba(219, 234, 254, .2), rgba(147, 197, 253, .06) 35%, transparent 65%);
}
.tilt.is-tilting > .glare { opacity: 1; }
.motion-ready .home .thread { transition: transform .8s cubic-bezier(.2, .8, .2, 1); }

/* Magnetic buttons ease toward the pointer and settle back */
.motion-ready .magnetic { will-change: transform; }

/* Industries: chips swell like a dock */
.motion-ready.js .home .trades li {
  transition: opacity .8s ease, transform .22s ease-out, color .25s ease, border-color .25s ease, background-color .25s ease, box-shadow .25s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 calc(var(--glow, 0) * 30px) rgba(96, 165, 250, calc(var(--glow, 0) * .5));
  border-color: rgba(147, 197, 253, calc(.2 + var(--glow, 0) * .6));
}

/* How it works: the connecting line follows the scroll; steps light up as they're reached */
.motion-ready .track.track-live::before { transform: scaleX(var(--fill, 0)); transition: transform .25s linear; box-shadow: 0 0 14px rgba(96, 165, 250, .6); }
.motion-ready .track-live .track-dot { transition: transform .5s cubic-bezier(.2, .8, .2, 1.3), filter .5s ease, box-shadow .5s ease; }
.motion-ready .track-live .track-step:not(.is-lit) .track-dot { filter: saturate(.35) brightness(.7); }
.motion-ready .track-live .track-step.is-lit .track-dot { transform: scale(1.08); box-shadow: 0 0 0 6px #060E1C, 0 0 0 9px rgba(96, 165, 250, .25), 0 0 44px rgba(96, 165, 250, .75); }

/* ── Floating glass objects in the sections ── */
.home .has-floaters { overflow: clip; }
.home .has-floaters > .wrap { position: relative; z-index: 1; }
.floater { position: absolute; z-index: 0; width: var(--fs, 130px); height: var(--fs, 130px); pointer-events: none; will-change: transform; }
.floater-r { right: clamp(-50px, calc(50% - 720px), 180px); }
.floater-l { left: clamp(-50px, calc(50% - 720px), 180px); }
@media (hover: hover) and (pointer: fine) {
  .floater { pointer-events: auto; cursor: grab; touch-action: none; }
  .floater.is-held { cursor: grabbing; z-index: 3; }
  .floater.is-held .floater-spin { animation-play-state: paused; }
}
.floater-spin { position: absolute; inset: 0; transform-style: preserve-3d; animation: floater-bob 9s ease-in-out infinite; }
@keyframes floater-bob {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  33% { transform: translate3d(10px, -18px, 0) rotate(6deg); }
  66% { transform: translate3d(-8px, 10px, 0) rotate(-5deg); }
}
.floater-body { position: absolute; inset: 0; display: block; }

/* glass bead */
.floater-orb { --fs: 150px; }
.floater-orb .floater-body {
  border-radius: 50%; border: 1px solid rgba(147, 197, 253, .45);
  background: radial-gradient(circle at 32% 28%, rgba(239, 246, 255, .55), rgba(96, 165, 250, .2) 38%, rgba(29, 78, 216, .12) 70%, rgba(37, 99, 235, .3) 100%);
  box-shadow: inset 0 -16px 30px rgba(29, 78, 216, .35), inset 0 10px 20px rgba(255, 255, 255, .18), 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 60px rgba(37, 99, 235, .25);
  -webkit-backdrop-filter: blur(6px) saturate(1.5); backdrop-filter: blur(6px) saturate(1.5);
}
.floater-orb .floater-body::after { content: ''; position: absolute; top: 14%; left: 22%; width: 34%; height: 18%; border-radius: 50%; background: rgba(255, 255, 255, .45); filter: blur(4px); transform: rotate(-24deg); }

/* glass ring */
.floater-ring { --fs: 160px; }
.floater-ring .floater-spin { animation: floater-tumble 14s linear infinite; }
.floater-ring .floater-body {
  border-radius: 50%;
  background: conic-gradient(from 30deg, rgba(96, 165, 250, .25), rgba(224, 242, 254, .85), rgba(37, 99, 235, .3), rgba(147, 197, 253, .7), rgba(96, 165, 250, .25));
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 55.5%, #000 69%, transparent 70.5%); mask: radial-gradient(circle, transparent 54%, #000 55.5%, #000 69%, transparent 70.5%);
  filter: drop-shadow(0 0 18px rgba(96, 165, 250, .5));
}
@keyframes floater-tumble { from { transform: rotateX(62deg) rotateZ(0deg); } to { transform: rotateX(62deg) rotateZ(360deg); } }

/* glass capsule */
.floater-pill { --fs: 180px; }
.floater-pill .floater-body {
  top: 34%; bottom: 34%; border-radius: 999px; border: 1px solid rgba(147, 197, 253, .45);
  background: linear-gradient(180deg, rgba(219, 234, 254, .35), rgba(37, 99, 235, .14) 60%, rgba(96, 165, 250, .28));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 24px 50px -18px rgba(0, 0, 0, .7), 0 0 40px rgba(37, 99, 235, .25);
  -webkit-backdrop-filter: blur(8px) saturate(1.4); backdrop-filter: blur(8px) saturate(1.4);
}

/* glass cube: six faces turning in 3D */
.floater-cube { --fs: 92px; perspective: 600px; }
.floater-cube .floater-spin { animation: floater-cube 18s linear infinite; }
@keyframes floater-cube { from { transform: rotateX(-24deg) rotateY(0deg) rotateZ(8deg); } to { transform: rotateX(-24deg) rotateY(360deg) rotateZ(8deg); } }
.face {
  position: absolute; inset: 0; display: block; border-radius: 12px; border: 1px solid rgba(191, 219, 254, .6);
  background: linear-gradient(135deg, rgba(219, 234, 254, .3), rgba(37, 99, 235, .12));
  box-shadow: inset 0 0 24px rgba(96, 165, 250, .3);
}
.floater-cube .face-0 { transform: translateZ(46px); }
.floater-cube .face-1 { transform: rotateY(180deg) translateZ(46px); }
.floater-cube .face-2 { transform: rotateY(90deg) translateZ(46px); }
.floater-cube .face-3 { transform: rotateY(-90deg) translateZ(46px); }
.floater-cube .face-4 { transform: rotateX(90deg) translateZ(46px); }
.floater-cube .face-5 { transform: rotateX(-90deg) translateZ(46px); }

/* stacked glass panes */
.floater-prism { --fs: 120px; perspective: 700px; }
.floater-prism .floater-spin { animation: floater-panes 16s ease-in-out infinite; }
@keyframes floater-panes { 0%, 100% { transform: rotateX(48deg) rotateZ(-30deg); } 50% { transform: rotateX(40deg) rotateZ(30deg) translateY(-14px); } }
.floater-prism .face { border-radius: 18px; }
.floater-prism .face-0 { transform: translateZ(-40px); opacity: .5; }
.floater-prism .face-1 { transform: translateZ(-20px); opacity: .65; }
.floater-prism .face-2 { transform: translateZ(0); opacity: .8; }
.floater-prism .face-3 { transform: translateZ(20px); opacity: .9; }
.floater-prism .face-4 { transform: translateZ(40px); background: linear-gradient(135deg, rgba(239, 246, 255, .45), rgba(96, 165, 250, .2)); }

@media (max-width: 759px) {
  .floater { opacity: .55; }
  .floater-orb { --fs: 96px; } .floater-ring { --fs: 104px; } .floater-pill { --fs: 116px; } .floater-cube { --fs: 64px; } .floater-prism { --fs: 84px; }
  .floater-cube .face-0 { transform: translateZ(32px); } .floater-cube .face-1 { transform: rotateY(180deg) translateZ(32px); }
  .floater-cube .face-2 { transform: rotateY(90deg) translateZ(32px); } .floater-cube .face-3 { transform: rotateY(-90deg) translateZ(32px); }
  .floater-cube .face-4 { transform: rotateX(90deg) translateZ(32px); } .floater-cube .face-5 { transform: rotateX(-90deg) translateZ(32px); }
  .floater-r { right: -40px; } .floater-l { left: -40px; }
}

/* ── Pointer light ── */
.cursor-light {
  position: fixed; top: 0; left: 0; z-index: 5; width: 360px; height: 360px; margin: -180px 0 0 -180px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(96, 165, 250, .14), rgba(37, 99, 235, .05) 45%, transparent 70%);
  mix-blend-mode: screen; opacity: 0; transition: opacity .4s ease, width .35s ease, height .35s ease, margin .35s ease;
}
.cursor-light.is-on { opacity: 1; }
.cursor-light.is-over { width: 440px; height: 440px; margin: -220px 0 0 -220px; }

/* ── Pause motion switch ── */
.motion-toggle {
  position: fixed; left: 16px; bottom: 16px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 12px;
  border: 1px solid rgba(147, 197, 253, .3); border-radius: 999px; color: var(--on-ink); font: 600 13px/1 var(--body); cursor: pointer;
  background: rgba(11, 27, 51, .55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 14px 30px -12px rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
}
.motion-toggle:hover { border-color: var(--sky); color: #fff; }
.motion-toggle-icon { position: relative; display: block; width: 10px; height: 12px; }
.motion-toggle-icon::before, .motion-toggle-icon::after { content: ''; position: absolute; top: 0; bottom: 0; width: 3px; border-radius: 1px; background: currentColor; }
.motion-toggle-icon::before { left: 0; } .motion-toggle-icon::after { right: 0; }
.motion-paused .motion-toggle-icon::before { left: 1px; width: 0; border-radius: 0; background: none; border-style: solid; border-color: transparent transparent transparent currentColor; border-width: 6px 0 6px 10px; }
.motion-paused .motion-toggle-icon::after { display: none; }
@media (max-width: 559px) { .motion-toggle { left: 12px; bottom: 12px; min-height: 36px; padding: 0 12px 0 10px; } }

/* Paused: the looping animations stop where they are (entrance animations still finish, so nothing stays hidden) */
.motion-paused .floater-spin, .motion-paused .thread-label::before { animation-play-state: paused; }
