/* ==========================================================
   Motion & depth layer — loaded after styles.css.
   Everything here respects prefers-reduced-motion (bottom).
   ========================================================== */

/* ---------- Scroll progress ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, rgba(255,255,255,.2), #fff); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 0; }
.hero__inner { position: relative; z-index: 2; }
.hero__title { max-width: none; }
.hero__title .line { display: block; }
.pill__arrow { margin-left: 2px; color: var(--muted); transition: transform .2s; }
.pill:hover .pill__arrow { transform: translateX(3px); color: var(--text); }

/* split headline: each word rises out of a blur */
[data-split] .w { display: inline-block; white-space: pre; opacity: 0; filter: blur(12px); transform: translateY(.35em); animation: word .9s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--i) * 55ms + 120ms); }
@keyframes word { to { opacity: 1; filter: blur(0); transform: none; } }

/* drifting monochrome aurora */
.aurora { position: absolute; inset: -10% -10% auto; height: 1100px; z-index: 0; pointer-events: none; overflow: hidden; filter: blur(60px); opacity: .9; }
.aurora i { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.16), transparent 70%); animation: drift 18s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 720px; height: 520px; left: 8%; top: 4%; }
.aurora i:nth-child(2) { width: 640px; height: 640px; right: 4%; top: 14%; animation-duration: 22s; animation-delay: -6s; background: radial-gradient(closest-side, rgba(255,255,255,.10), transparent 70%); }
.aurora i:nth-child(3) { width: 900px; height: 420px; left: 28%; top: 46%; animation-duration: 26s; animation-delay: -11s; background: radial-gradient(closest-side, rgba(255,255,255,.08), transparent 70%); }
@keyframes drift { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,-30px) scale(1.08); } 100% { transform: translate(-50px,40px) scale(.95); } }
.hero__glow { display: none; }
.hero__grid { z-index: 1; }

/* cursor spotlight */
.spot { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(520px circle at var(--sx, 50%) var(--sy, 30%), rgba(255,255,255,.07), transparent 60%); transition: opacity .4s; }

/* stage: 3D tilt that flattens on scroll */
.stage { position: relative; z-index: 2; width: min(1320px, calc(100% - 48px)); margin: 56px auto 0; perspective: 1800px; }
.stage__frame { transform-origin: 50% 0; transform: rotateX(calc(var(--tilt, 1) * 22deg)) scale(calc(1 - var(--tilt, 1) * .06)); transition: transform .1s linear; will-change: transform; }
.stage__frame { opacity: 0; animation: rise 1.3s cubic-bezier(.2,.7,.2,1) .55s forwards; }
@keyframes rise { from { opacity: 0; translate: 0 80px; } to { opacity: 1; translate: 0 0; } }
.stage__beam { position: absolute; left: 50%; top: -40px; width: 70%; height: 220px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255,255,255,.22), transparent 70%); filter: blur(30px); z-index: -1; }

/* hero window: animated conic border */
.window--hero { position: relative; border: 0; padding: 1px; background: #0e0e0e; border-radius: 18px; box-shadow: 0 60px 140px -40px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.06); }
.window--hero::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--a, 0deg), rgba(255,255,255,.05), rgba(255,255,255,.55), rgba(255,255,255,.05) 30%, rgba(255,255,255,.05) 70%, rgba(255,255,255,.35), rgba(255,255,255,.05)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 8s linear infinite; pointer-events: none; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --a: 360deg; } }
.window--hero .window__bar { border-radius: 17px 17px 0 0; }
.window--hero .window__shot { border-radius: 0 0 17px 17px; }
.window__url { display: inline-flex; align-items: center; gap: 6px; }
.window__url .i { width: 11px; height: 11px; }
/* light sweep across the screenshot */
.window__sheen { position: absolute; inset: 41px 0 0; border-radius: 0 0 17px 17px; pointer-events: none; overflow: hidden; }
.window__sheen::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30%; left: -40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.06), transparent); animation: sheen 7s ease-in-out 2.4s infinite; }
@keyframes sheen { 0% { left: -40%; } 40%, 100% { left: 120%; } }

/* live event toasts */
.toasts { position: absolute; inset: 0; pointer-events: none; }
.toast { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 14px; min-width: 280px; background: rgba(22,22,22,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 24px 60px -16px rgba(0,0,0,.85); opacity: 0; transform: translateY(14px) scale(.96); transition: opacity .5s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.toast.is-on { opacity: 1; transform: none; }
.toast b { display: block; font-size: 13.5px; font-weight: 600; }
.toast small { display: block; font-size: 12px; color: var(--muted); }
.toast__ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #fff; flex-shrink: 0; }
.toast__ico .i { width: 16px; height: 16px; }
.toast--ai .toast__ico { background: #fff; color: #0a0a0a; }
.toast--tl  { left: -28px;  top: 18%; }
.toast--tl2 { left: -28px;  top: 44%; }
.toast--tr  { right: -28px; top: 9%; }
.toast--bl  { left: 6%;     bottom: -26px; }
.toast--br  { right: -28px; bottom: 16%; }

/* ---------- Section reveals: add blur ---------- */
.reveal { filter: blur(6px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1), filter .8s ease; }
.reveal.in { filter: none; }

/* ---------- Spotlight cards (tiles, security, plans, gallery) ---------- */
[data-glow] { position: relative; isolation: isolate; }
[data-glow]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .3s; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.08), transparent 60%); }
[data-glow]:hover::after { opacity: 1; }
[data-glow] > * { position: relative; z-index: 1; }

/* ---------- Buttons: shine ---------- */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(0,0,0,.12), transparent); animation: shine 4.5s ease-in-out 1.5s infinite; }
@keyframes shine { 0% { left: -60%; } 30%, 100% { left: 130%; } }

/* ---------- Platform tabs: auto-advance progress ---------- */
.tabs__list button { position: relative; overflow: hidden; }
.tabs__list button::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }
.tabs__list[data-auto] button[aria-selected="true"]::after { animation: tabfill var(--tab-ms, 7000ms) linear forwards; }
.tabs__list[data-paused] button[aria-selected="true"]::after { animation-play-state: paused; }
@keyframes tabfill { to { transform: scaleX(1); } }
.tabs__panel .shot { transform: translateY(10px) scale(.985); opacity: 0; animation: shotin .7s cubic-bezier(.2,.7,.2,1) .05s forwards; }
@keyframes shotin { to { transform: none; opacity: 1; } }
.tabs__copy .checks li { opacity: 0; transform: translateX(-8px); animation: listin .5s ease forwards; animation-delay: calc(var(--i, 0) * 80ms + 120ms); }
@keyframes listin { to { opacity: 1; transform: none; } }

/* ---------- Numbers ---------- */
.numbers b { font-variant-numeric: tabular-nums; }

/* ---------- Gallery: gentle zoom on hover ---------- */
.gallery__item img { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.gallery__item:hover img { transform: scale(1.03); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .toast--tl, .toast--tl2 { left: 8px; }
  .toast--tr, .toast--br { right: 8px; }
}
@media (max-width: 640px) {
  .hero { padding-top: 40px; }
  .stage { width: calc(100% - 24px); margin-top: 36px; perspective: 1000px; }
  .toast { min-width: 0; max-width: 78%; padding: 9px 12px 9px 9px; }
  .toast b { font-size: 12px; } .toast small { font-size: 11px; }
  .toast__ico { width: 28px; height: 28px; }
  .toast--tl, .toast--tl2, .toast--tr, .toast--br { left: 8px; right: auto; }
  .toast--bl { left: 8px; bottom: -18px; }
  .toast--tl { top: 8%; } .toast--tl2 { top: 30%; } .toast--tr { top: 52%; } .toast--br { top: 70%; bottom: auto; }
  .aurora { height: 700px; }
}

/* ---------- Reduced motion: everything visible, nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-split] .w, .stage__frame, .tabs__panel .shot, .tabs__copy .checks li { opacity: 1 !important; filter: none !important; transform: none !important; translate: none !important; animation: none !important; }
  .stage__frame { transform: none !important; }
  .aurora i, .window--hero::before, .window__sheen::after, .btn--primary::after { animation: none !important; }
  .reveal { filter: none; }
}
.no-js [data-split] .w, .no-js .stage__frame { opacity: 1; filter: none; transform: none; animation: none; }
/* gradient-text words inside the serif line keep the gradient */
.serif .w { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tabs__list button { flex-shrink: 0; }
.hero { padding-top: 44px; }
.hero__title { font-size: clamp(36px, 5.6vw, 70px); }
.hero__cta { margin-top: 28px; }
.stage { margin-top: 44px; }

/* ==========================================================
   Real-time section
   ========================================================== */
.live { overflow: hidden; }
.live .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.live__dot, .live__rec { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.6); animation: pulse 1.8s ease-out infinite; display: inline-block; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.55); } 100% { box-shadow: 0 0 0 10px rgba(255,255,255,0); } }
.live__stage { position: relative; max-width: 1240px; margin: 0 auto; }
.live__labels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.live__labels span { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); font-weight: 500; }
.live__labels i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; background: #fff; color: #0a0a0a; }
.window--live { box-shadow: 0 50px 120px -40px rgba(0,0,0,.95), 0 0 0 1px var(--line-2); }
.window--live .window__url { display: inline-flex; align-items: center; gap: 8px; }
.live__video { display: block; width: 100%; height: auto; aspect-ratio: 2424 / 760; background: #111; }
.live__ping { position: absolute; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #fff; color: #0a0a0a; box-shadow: 0 12px 40px -8px rgba(0,0,0,.8); opacity: 0; transform: translateY(8px) scale(.95); transition: opacity .35s, transform .45s cubic-bezier(.2,.7,.2,1); pointer-events: none; white-space: nowrap; }
.live__ping.is-on { opacity: 1; transform: none; }
.live__ping--a { left: 14%; top: 92px; }
.live__ping--b { right: 10%; top: 92px; }
.live__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 48px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.live__item { background: var(--bg); padding: 22px 24px; }
.live__item b { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-family: var(--display); }
.live__item b::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.live__item span { display: block; margin-top: 6px; color: var(--muted); font-size: 14.5px; }

/* ==========================================================
   Feature chapters
   ========================================================== */
.chapters .section__head { margin-bottom: 40px; }
.chap { display: grid; grid-template-columns: 0.8fr 1.35fr; gap: 56px; align-items: center; padding: 64px 0; border-top: 1px solid var(--line); }
.chap:first-of-type { border-top: 0; }
.chap--flip { grid-template-columns: 1.35fr 0.8fr; }
.chap--flip .chap__copy { order: 2; }
.chap h3 { font-size: clamp(26px, 2.8vw, 36px); letter-spacing: -0.025em; line-height: 1.12; }
.chap__copy > p { margin-top: 14px; color: var(--muted); font-size: 16.5px; }
.chap__steps { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 4px; position: relative; }
.chap__steps::before { content: ""; position: absolute; left: 15px; top: 14px; bottom: 14px; width: 1px; background: var(--line-2); }
.chap__steps li { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 14px; padding: 10px 12px 10px 0; border-radius: 12px; transition: opacity .35s, transform .35s; opacity: .45; }
.chap__steps li.is-on { opacity: 1; transform: translateX(4px); }
.chap__n { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--bg); border: 1px solid var(--line-2); color: var(--muted); transition: background .35s, color .35s, border-color .35s; }
.chap__steps li.is-on .chap__n { background: #fff; color: #0a0a0a; border-color: #fff; box-shadow: 0 0 0 6px rgba(255,255,255,.08); }
.chap__steps b { display: block; font-size: 15.5px; font-weight: 600; }
.chap__steps small { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.chap__media .window { position: relative; box-shadow: 0 40px 100px -40px rgba(0,0,0,.95), 0 0 0 1px var(--line-2); }
.chap__media video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; background: #111; }
.chap__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.08); }
.chap__bar i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--v, 0)); background: #fff; }

/* ==========================================================
   Everything grid
   ========================================================== */
.every__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feat { border-radius: 18px; border: 1px solid var(--line); background: var(--bg-2); padding: 22px; transition: border-color .25s, transform .25s; }
.feat:hover { border-color: var(--line-2); transform: translateY(-3px); }
.feat__ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.06); border: 1px solid var(--line-2); margin-bottom: 14px; }
.feat__ico .i { width: 18px; height: 18px; }
.feat h3 { font-size: 16.5px; }
.feat ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.feat li { font-size: 13.5px; color: var(--muted); padding-left: 16px; position: relative; }
.feat li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 1px; background: var(--dim); }

@media (max-width: 1100px) { .every__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 960px) {
  .chap, .chap--flip { grid-template-columns: 1fr; gap: 28px; padding: 44px 0; }
  .chap--flip .chap__copy { order: 0; }
  .live__grid { grid-template-columns: 1fr 1fr; }
  .every__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .live__labels { grid-template-columns: 1fr; gap: 6px; }
  .live__ping { display: none; }
  .live__grid, .every__grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .live__dot, .live__rec { animation: none; }
  .chap__steps li { opacity: 1; transform: none; }
}

.window__url { max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .window--live .window__url { font-size: 11px; } }
