/* FORMA launch website — the live cursor (9 Nov 2026). Loaded by every page after site.css.
   Only for a fine pointer that can hover (a mouse or trackpad). Phones, tablets and anyone who has asked for
   reduced motion get the site exactly as it is: the script never runs and nothing below applies. */

@media (hover: hover) and (pointer: fine) {
  /* the real pointer goes; the dot and the ring stand in for it */
  html.has-cursor, html.has-cursor body, html.has-cursor a, html.has-cursor button, html.has-cursor summary,
  html.has-cursor input, html.has-cursor label, html.has-cursor figure.shot { cursor: none; }
  html.has-cursor .film-frame iframe, html.has-cursor .film-frame video { cursor: auto; }

  /* the stage under the whole site: a grid and a follow spot that only show around the cursor */
  html.has-cursor .wrap { position: relative; z-index: 1; }
  .fc-stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; --x: 50vw; --y: 40vh; opacity: 0; transition: opacity .6s; }
  .fc-stage.is-on { opacity: 1; }
  .fc-stage::before { content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(145,152,166,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(145,152,166,.22) 1px, transparent 1px);
    background-size: 48px 48px; background-position: center top;
    -webkit-mask-image: radial-gradient(300px circle at var(--x) var(--y), #000 0, rgba(0,0,0,.55) 45%, transparent 100%);
    mask-image: radial-gradient(300px circle at var(--x) var(--y), #000 0, rgba(0,0,0,.55) 45%, transparent 100%); }
  .fc-stage::after { content: ""; position: absolute; inset: 0;
    background: radial-gradient(380px circle at var(--x) var(--y), rgba(43,217,228,.075), transparent 70%),
                radial-gradient(460px circle at calc(var(--x) + 70px) calc(var(--y) + 90px), rgba(123,97,255,.065), transparent 70%); }

  /* the dot (the dancer) and the ring (the ghost that follows) */
  .fc-dot, .fc-ring, .fc-ghost { position: fixed; left: 0; top: 0; pointer-events: none; border-radius: 50%; }
  .fc-dot { z-index: 9999; width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--cyan); box-shadow: 0 0 14px rgba(43,217,228,.65); will-change: transform; transition: opacity .2s, width .2s, height .2s, margin .2s; }
  .fc-ring { z-index: 9998; width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1px solid rgba(241,243,247,.55); display: grid; place-items: center; overflow: hidden; will-change: transform;
    transition: opacity .2s, width .24s cubic-bezier(.2,.7,.2,1), height .24s cubic-bezier(.2,.7,.2,1), margin .24s cubic-bezier(.2,.7,.2,1), border-color .24s, background-color .24s, border-radius .24s; }
  .fc-ring .fc-label { font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--paper); white-space: nowrap; opacity: 0; transition: opacity .2s; text-align: center; }
  .fc-ring .fc-label[data-sub]::after { content: attr(data-sub); display: block; margin-top: 5px; font-size: 8px; letter-spacing: .1em; color: var(--cyan); }
  .fc-dot.is-hidden, .fc-ring.is-hidden { opacity: 0; }

  /* over a link or a button: the ring opens */
  .fc-ring.is-link { width: 54px; height: 54px; margin: -27px 0 0 -27px; border-color: var(--cyan); background-color: rgba(43,217,228,.08); }
  /* over a link with something to say: the ring carries a word */
  .fc-ring.is-word { width: 104px; height: 104px; margin: -52px 0 0 -52px; border-color: rgba(43,217,228,.7); background-color: rgba(12,13,16,.72); }
  .fc-ring.is-word .fc-label { opacity: 1; }
  /* in a text field: a bar */
  .fc-ring.is-text { width: 3px; height: 26px; margin: -13px 0 0 -1px; border-radius: 2px; border-color: transparent; background-color: var(--cyan); }
  .fc-dot.is-text { opacity: 0; }
  /* over a picture of the app: the ring becomes a lens, showing the real screen at twice the size */
  .fc-ring.is-lens { width: 176px; height: 176px; margin: -88px 0 0 -88px; border-color: rgba(241,243,247,.75); background-color: #0C0D10; background-repeat: no-repeat; box-shadow: 0 10px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(12,13,16,.8); }
  .fc-dot.is-lens { width: 4px; height: 4px; margin: -2px 0 0 -2px; }
  /* over a picture that can play: a small ring with a word; the picture itself moves */
  .fc-ring.is-play { width: 84px; height: 84px; margin: -42px 0 0 -42px; border-color: rgba(43,217,228,.7); background-color: rgba(12,13,16,.62); }
  .fc-ring.is-play .fc-label { opacity: 1; font-size: 9px; }
  .fc-dot.is-play { opacity: 0; }

  /* the ghosts the dot leaves behind */
  .fc-ghost { z-index: 9997; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: rgba(43,217,228,.55); animation: fc-ghost .6s linear forwards; }
  @keyframes fc-ghost { to { opacity: 0; transform: scale(.3); } }

  /* the light on the letters: headings carry a soft white where the cursor is */
  html.has-cursor .page-wide h1, html.has-cursor .page-wide h2, html.has-cursor .page-wide blockquote.pull, html.has-cursor .page-doc h1 { --mx: -9999px; --my: -9999px;
    background-image: radial-gradient(260px circle at var(--mx) var(--my), #ffffff 0, #d9f8fb 22%, var(--paper) 58%);
    -webkit-background-clip: text; background-clip: text; color: transparent; }
  html.has-cursor .page-wide blockquote.pull { border-left-color: var(--violet); }

  /* buttons lean toward the cursor */
  html.has-cursor .btn, html.has-cursor .btn-ghost, html.has-cursor nav.top .cta-nav { transition: transform .18s ease-out, filter .15s, border-color .15s; will-change: transform; }

  /* pictures of the app: a little depth, and a layer that plays the real screen under the cursor */
  html.has-cursor figure.shot { perspective: 1400px; }
  html.has-cursor figure.shot .fc-pic { position: relative; transform: rotateX(var(--rx, 0deg)) rotateY(calc(var(--ry, 0deg) + var(--flip, 0deg))); transition: transform .22s ease-out; transform-style: preserve-3d; }
  html.has-cursor figure.shot .fc-pic.is-flipped { --flip: 180deg; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
  html.has-cursor figure.shot .fc-pic img { transition: none; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
  .fc-play { position: absolute; inset: 1px; border-radius: 13px; background-repeat: no-repeat; opacity: 0; transition: opacity .25s; pointer-events: none; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
  .fc-play.is-on { opacity: 1; }
  /* the hold: the panels cleared away, fading in over the picture */
  .fc-pic.is-hold .fc-play.is-on { transition: opacity .55s; }
  /* the back of a picture: the audience view */
  .fc-back { position: absolute; inset: 0; transform: rotateY(180deg); backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 14px; overflow: hidden; }
  /* frosted glass over the launch film */
  .fc-frost { position: absolute; inset: 0; --x: 50%; --y: 45%; background: rgba(21,23,28,.42); -webkit-backdrop-filter: blur(14px) saturate(.8); backdrop-filter: blur(14px) saturate(.8); -webkit-mask-image: radial-gradient(circle at var(--x) var(--y), transparent 0, transparent 70px, #000 220px); mask-image: radial-gradient(circle at var(--x) var(--y), transparent 0, transparent 70px, #000 220px); pointer-events: none; transition: opacity .8s; }
  .fc-frost.is-gone { opacity: 0; }
  .fc-back img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--raise); transform: none; }
}
