/* ISPilot marketing site: video, motion and interactive layers.
   Loaded after the page's inline styles; uses the same :root tokens.
   Everything that moves is switched off under prefers-reduced-motion,
   and nothing is hidden unless motion.js has added .motion-ok to <html>. */

:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- Scroll reveal ---------- */
.motion-ok .reveal { opacity: 0; transform: translateY(22px); filter: blur(6px);
  transition: opacity .7s var(--ease-out-expo), transform .7s var(--ease-out-expo), filter .7s var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms); }
.motion-ok .reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- Hero video card ---------- */
.hero-media { background: #0b0e14; }
.hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-arcs { position: absolute; left: 50%; top: 50%; width: 1100px; height: 1100px; margin: -550px 0 0 -550px;
  pointer-events: none; z-index: -1; }
.hero-arcs span { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(139,124,255,0.22); opacity: 0; }
.motion-ok .hero-arcs span { animation: arc-ripple 7.5s var(--ease-in-out) infinite; }
.hero-arcs span:nth-child(2) { animation-delay: 2.5s; border-color: rgba(255,176,32,0.18); }
.hero-arcs span:nth-child(3) { animation-delay: 5s; }
@keyframes arc-ripple { 0% { transform: scale(.32); opacity: 0; } 18% { opacity: 1; } 100% { transform: scale(1); opacity: 0; } }

.hero-play { position: absolute; left: 20px; bottom: 20px; z-index: 3; display: inline-flex; align-items: center; gap: 12px;
  border: 1px solid rgba(244,242,250,0.22); background: rgba(11,14,20,0.62); backdrop-filter: blur(10px); color: var(--text);
  border-radius: 999px; padding: 8px 18px 8px 8px; font: inherit; cursor: pointer; text-align: left;
  transition: transform .2s var(--ease-out-expo), background .2s, border-color .2s; }
.hero-play:hover { transform: translateY(-2px); background: rgba(109,94,245,0.32); border-color: rgba(139,124,255,0.7); }
.hero-play:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.hero-play .ring { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--amber-light), var(--amber-deep)); color: #211200;
  box-shadow: 0 0 0 0 rgba(255,176,32,0.55); }
.motion-ok .hero-play .ring { animation: play-ping 2.8s ease-out infinite; }
@keyframes play-ping { 0% { box-shadow: 0 0 0 0 rgba(255,176,32,0.5); } 70%,100% { box-shadow: 0 0 0 16px rgba(255,176,32,0); } }
.hero-play b { display: block; font-size: 14px; }
.hero-play small { display: block; font-size: 12px; color: var(--muted); }

/* Live activity feed over the hero card (example activity, labelled as such). */
.live-feed { position: absolute; top: 22px; left: -34px; width: 270px; z-index: 4; display: grid; gap: 10px; }
.live-feed .feed-label { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2);
  display: flex; align-items: center; gap: 7px; padding-left: 4px; }
.live-feed .feed-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); display: block; }
.motion-ok .live-feed .feed-label i { animation: live-dot 1.6s ease-in-out infinite; }
@keyframes live-dot { 50% { opacity: .35; } }
.toast { display: flex; gap: 11px; align-items: center; padding: 11px 13px; border-radius: 14px;
  background: rgba(21,25,38,0.94); backdrop-filter: blur(12px); border: 1px solid var(--border-strong);
  box-shadow: 0 18px 40px -16px rgba(0,0,0,0.7); font-size: 12.5px; line-height: 1.3; }
.toast .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.toast .ic.pay { background: rgba(52,211,153,0.16); color: var(--good); }
.toast .ic.net { background: rgba(109,94,245,0.2); color: var(--violet-light); }
.toast .ic.guest { background: rgba(255,176,32,0.16); color: var(--amber); }
.toast b { display: block; font-size: 13px; }
.toast span { color: var(--muted); }
.toast time { margin-left: auto; color: var(--muted-2); font-size: 11px; white-space: nowrap; align-self: flex-start; }
.motion-ok .toast { transition: opacity .5s var(--ease-out-expo), transform .5s var(--ease-out-expo), filter .5s; }
.toast.enter { opacity: 0; transform: translateY(-14px) scale(.96); filter: blur(4px); }
.toast.leave { opacity: 0; transform: translateY(10px) scale(.96); filter: blur(4px); }

/* ---------- Capability marquee ---------- */
.marquee { position: relative; overflow: hidden; margin-top: 18px; padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 12px; width: max-content; }
.motion-ok .marquee-track { animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee .chip { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; font-size: 13.5px; font-weight: 700;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: rgba(244,242,250,0.04); color: var(--text); }
.marquee .chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); display: block; }
.marquee .chip:nth-child(3n+2) i { background: var(--violet-light); }

/* ---------- Video theater ---------- */
.see-it { position: relative; overflow: hidden; }
.see-it::before { content: ""; position: absolute; left: 50%; top: 10%; width: 1200px; height: 700px; margin-left: -600px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(109,94,245,0.22), transparent 70%); pointer-events: none; }
.theater { position: relative; display: grid; grid-template-columns: 1fr 330px; gap: 22px; align-items: start; }
.theater-screen { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--border-strong);
  background: #000; aspect-ratio: 16 / 9; box-shadow: 0 40px 90px -30px rgba(0,0,0,0.8), 0 0 0 6px rgba(244,242,250,0.03); }
.theater-screen video { width: 100%; height: 100%; display: block; background: #000; }
.theater-list { display: grid; gap: 10px; }
.theater-item { display: grid; grid-template-columns: 104px 1fr; gap: 12px; align-items: center; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 8px; color: var(--text);
  font: inherit; cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--ease-out-expo); }
.theater-item:hover { border-color: var(--border-strong); transform: translateX(3px); }
.theater-item:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.theater-item[aria-selected="true"] { border-color: rgba(139,124,255,0.75); background: linear-gradient(135deg, rgba(109,94,245,0.18), var(--surface) 70%); }
.theater-item .thumb { position: relative; aspect-ratio: 16/9; border-radius: 9px; overflow: hidden; background: #000; }
.theater-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.theater-item .thumb em { position: absolute; right: 5px; bottom: 5px; font-style: normal; font-size: 10.5px; font-weight: 800;
  background: rgba(11,14,20,0.82); padding: 2px 6px; border-radius: 5px; }
.theater-item b { display: block; font-size: 14px; line-height: 1.25; }
.theater-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.chapters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chapters[hidden] { display: none; }
.chapters button { font: inherit; font-size: 12.5px; font-weight: 700; color: var(--muted); background: rgba(244,242,250,0.05);
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 13px; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.chapters button:hover, .chapters button.on { color: var(--text); border-color: rgba(255,176,32,0.6); background: rgba(255,176,32,0.1); }
.chapters button span { color: var(--amber); margin-right: 6px; font-variant-numeric: tabular-nums; }
.theater-note { color: var(--muted-2); font-size: 12.5px; margin-top: 12px; }

/* ---------- Industry cards with footage ---------- */
.industry-media { position: relative; margin: -30px -28px 24px; aspect-ratio: 16 / 7; overflow: hidden; }
.industry-media video, .industry-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.industry-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--surface) 0%, rgba(21,25,38,0) 60%); }

/* ---------- Photo/video grid ---------- */
.photo-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-card { transition: transform .4s var(--ease-out-expo), border-color .2s; }
.photo-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }

/* ---------- Spotlight on cards (pointer-follow glow) ---------- */
.feature-card, .step, .price-card { position: relative; isolation: isolate; }
.feature-card::after, .step::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; opacity: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(139,124,255,0.16), transparent 60%);
  transition: opacity .3s; pointer-events: none; }
.feature-card:hover::after, .step:hover::after { opacity: 1; }

/* ---------- How it works: the flow diagram ---------- */
.flow { position: relative; margin: 0 0 30px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface);
  padding: 18px 10px 8px; overflow: hidden; }
.flow svg { width: 100%; height: auto; display: block; }
.flow .lbl { font: 700 13px Manrope, sans-serif; fill: var(--text); }
.flow .sub { font: 600 11px Manrope, sans-serif; fill: rgba(244,242,250,0.55); }
.flow .wire { stroke: rgba(244,242,250,0.14); stroke-width: 2; fill: none; }
.flow .wire-live { stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-dasharray: 6 14; }
.motion-ok .flow .wire-live { animation: wire-flow 1.4s linear infinite; }
@keyframes wire-flow { to { stroke-dashoffset: -40; } }
.flow-caption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 4px 14px 10px;
  font-size: 12.5px; color: var(--muted-2); }
.steps .step { transition: border-color .4s, background .4s, transform .4s var(--ease-out-expo); }
.steps .step.lit { border-color: rgba(255,176,32,0.45); background: linear-gradient(180deg, rgba(255,176,32,0.07), var(--surface) 55%); }

/* ---------- Film lightbox ---------- */
.film-modal { position: fixed; inset: 0; z-index: 220; display: grid; place-items: center; padding: 20px; }
.film-modal[hidden] { display: none; }
.film-modal-backdrop { position: absolute; inset: 0; background: rgba(6,7,12,0.86); backdrop-filter: blur(6px); }
.film-modal-box { position: relative; width: min(1100px, 100%); border-radius: 18px; overflow: hidden; border: 1px solid var(--border-strong);
  box-shadow: 0 40px 120px rgba(0,0,0,0.7); background: #000; }
.film-modal-box video { width: 100%; display: block; aspect-ratio: 16/9; background: #000; }
.film-modal-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: rgba(11,14,20,0.7); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
.film-modal-x:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.motion-ok .film-modal-box { animation: film-in .45s var(--ease-out-expo); }
@keyframes film-in { from { opacity: 0; transform: scale(.94) translateY(16px); } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-visual { width: 100%; }
  .theater { grid-template-columns: 1fr; }
  .theater-list { grid-template-columns: repeat(2, 1fr); }
  .live-feed { left: 10px; top: 12px; width: 240px; }
  .hero-arcs { width: 720px; height: 720px; margin: -360px 0 0 -360px; }
}
@media (max-width: 560px) {
  .theater-list { grid-template-columns: 1fr; }
  .live-feed { width: 220px; }
  .live-feed .toast:nth-of-type(n+3) { display: none; }
  .industry-media { margin: -30px -22px 22px; }
  .flow .sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track, .hero-arcs span, .hero-play .ring, .flow .wire-live, .live-feed .feed-label i { animation: none !important; }
  .marquee { overflow-x: auto; }
}

/* ---------- Pricing: secondary "buy online" link under Talk to sales ---------- */
.price-alt { margin-top: 10px; background: none; border: 0; padding: 4px; font: inherit; font-size: 13px; font-weight: 700;
  color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; align-self: center; }
.price-alt:hover { color: var(--text); }
.price-alt:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 6px; }

/* ---------- Hospitality page ---------- */
.hosp-backdrop { position: absolute; left: -64px; right: -64px; top: 12px; bottom: 44px; border-radius: 26px; overflow: hidden;
  border: 1px solid var(--border-strong); box-shadow: 0 40px 90px -30px rgba(0,0,0,0.8); background: #0b0e14; }
.hosp-backdrop video, .hosp-backdrop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hosp-backdrop::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 70% at 50% 45%, rgba(11,14,20,0.25), rgba(11,14,20,0.82)); }
.hero-visual .phone-stack { position: relative; z-index: 2; }
.hero-visual .hosp-play { left: -18px; bottom: 6px; }
.pillar-media { position: relative; margin: 24px 0 0; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 10;
  border: 1px solid var(--border); background: #0b0e14; }
.pillar-media video, .pillar-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pillar-media figcaption { position: absolute; left: 12px; bottom: 12px; font-size: 12px; font-weight: 700; padding: 5px 11px;
  border-radius: 999px; background: rgba(11,14,20,0.72); border: 1px solid var(--border-strong); }
@media (max-width: 980px) {
  .hosp-backdrop { left: -8px; right: -8px; }
  .hero-visual .hosp-play { left: 4px; }
}

/* ---------- Bond page ---------- */
.bond-visual .bond-bg { position: absolute; inset: 0; z-index: 0; }
.bond-visual .bond-bg video, .bond-visual .bond-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bond-visual .bond-bg::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(80% 70% at 50% 50%, rgba(21,25,38,0.62), rgba(21,25,38,0.9)); }
.bond-visual > svg { position: relative; z-index: 1; }
.hero-visual .bond-play { left: -18px; bottom: -22px; }
.wide-media { position: relative; margin: 0 0 28px; border-radius: 20px; overflow: hidden; aspect-ratio: 21 / 8; border: 1px solid var(--border); background: #0b0e14; }
.wide-media video, .wide-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wide-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,14,20,0.85) 0%, rgba(11,14,20,0.2) 55%, rgba(11,14,20,0) 100%); }
.wide-media figcaption { position: absolute; z-index: 1; left: 28px; top: 50%; transform: translateY(-50%); max-width: 46%;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: clamp(20px, 2.6vw, 32px); line-height: 1.12; }
.wide-media figcaption span { display: block; margin-top: 8px; font-family: Manrope, sans-serif; font-weight: 600; font-size: 14px; color: var(--muted); }
@media (max-width: 560px) {
  .wide-media { aspect-ratio: 4 / 3; }
  .wide-media figcaption { max-width: 80%; top: auto; bottom: 18px; transform: none; left: 18px; }
  .wide-media::after { background: linear-gradient(0deg, rgba(11,14,20,0.9) 0%, rgba(11,14,20,0) 70%); }
  .hero-visual .bond-play { left: 4px; bottom: -26px; }
}
