/* Tornado scene + tornado cursor.
   Kept in its own file so tornado-lab.html can load it on its own. */

/* ---------- Scene card ---------- */
.tornado-card {
  width: 100%; max-width: 520px; justify-self: end;
  padding: 14px; border-radius: 26px;
  border: 1px solid rgba(179, 201, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), 0 0 60px rgba(80, 120, 255, 0.1);
}
.tornado-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin: 2px 6px 10px; font-size: 0.86rem; font-weight: 600; letter-spacing: 0.01em;
}
.tornado-head .badge {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; padding: 4px 9px;
  border-radius: 999px; border: 1px solid rgba(173, 196, 255, 0.18); color: rgba(236, 242, 255, 0.58); white-space: nowrap;
}
.tornado-wrap {
  position: relative; width: 100%; overflow: hidden; border-radius: 18px;
  background: #070e22; cursor: grab; touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
}
.tornado-wrap.holding { cursor: grabbing; }
#tornadoCanvas { display: block; width: 100%; }
.tornado-controls {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px;
  align-items: center; margin-top: 12px; padding: 0 4px;
  font-size: 0.8rem; color: rgba(236, 242, 255, 0.58);
}
.tornado-controls input[type=range] { width: 100%; height: 32px; margin: 0; accent-color: #7ea8ff; cursor: pointer; }
.tornado-controls output {
  min-width: 86px; text-align: right; font-variant-numeric: tabular-nums;
  color: rgba(236, 242, 255, 0.84); font-weight: 600;
}
.tornado-hint { margin: 9px 6px 0; font-size: 0.74rem; line-height: 1.5; color: rgba(236, 242, 255, 0.58); text-align: center; }

/* ---------- Tornado cursor ---------- */
.tw-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 210; }
/* the system cursor is hidden ONLY while the vortex is showing (in the zone, not over a control) */
html.tw-active, html.tw-active * { cursor: none !important; }

/* words keep wrapping normally; letters are the things that fly */
.tw-w { display: inline-block; white-space: nowrap; }
.tw-c {
  display: inline-block;
  pointer-events: none;                   /* the parent's box never moves, so clicks are unaffected */
}
/* promoted only while a letter is actually in the air — putting will-change on every
   letter would hand the compositor a layer per character across the whole page */
.tw-c.tw-fly { will-change: transform, opacity; }
.tw-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  user-select: none; -webkit-user-select: none; pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .tw-c { transition: none !important; }
}

/* ---------- Storm-cursor switch ---------- */
.tornado-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 4px 0; }
.tornado-switch small { color: rgba(236,242,255,.5); font-size: .72rem; line-height: 1.4; }
.tornado-switch .pill-btn { white-space: nowrap; padding: 7px 14px; font-size: .8rem; }
.tornado-switch .pill-btn {
  font: inherit; color: rgba(236,242,255,.84); cursor: pointer; border-radius: 999px;
  border: 1px solid rgba(173,196,255,.2); background: rgba(255,255,255,.04);
}
.tornado-switch .pill-btn.on { background: rgba(110,150,255,.3); color: #fff; border-color: rgba(150,185,255,.5); }
.tornado-switch .pill-btn:hover { border-color: rgba(190,210,255,.6); }
